help-gplusplus
[Top][All Lists]
Advanced

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

Howto turn one specific warning into an error


From: Marcel Loose
Subject: Howto turn one specific warning into an error
Date: Tue, 14 Dec 2004 11:46:56 +0100

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:

  warning: cannot pass objects of non-POD type ...

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.

Any suggestions will be appreciated.

Kind regards,

    Marcel Loose (loose AT astron DOT nl)





reply via email to

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