help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Howto turn one specific warning into an error


From: Guy Harrison
Subject: Re: Howto turn one specific warning into an error
Date: Thu, 16 Dec 2004 04:59:25 GMT
User-agent: KNode/0.7.7

Marcel Loose wrote:

> Hi all,
> 
> I wonder whether it is possible to turn one specific compiler warning into
> an error. The reason I ask this is that I really would like to make the
> compiler issue an error when it flags the following warning:

-Werror 'cos all warnings are errors, are they not ;-)
 
>   warning: cannot pass objects of non-POD type ...

Bad one to ignore.

> Usually, this warning means big trouble. In my case it meant that a string
> was passed as a const char*, which ultimately ended in a segmentation
> fault. The problem is that this warning passes un-noticed when programs
> are built automatically (e.g. through make). Everything seems fine, until
> you run into a segfault.

Pump it into the shell, 2>/some/script.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]