On Wed, Aug 27, 2014 at 10:59:40AM +0100, Dominik Vogt wrote: > I'm writing a dejagnu test and encounter this warning at one place: > > warning: passing argument 1 of '...' makes integer from pointer > without a cast [enabled by default] > > Now, I have a "{ dg-error ... }" comment in that line. The line > is generated from a script among hundreds of others that are all > expected to produce errors, not warnings. It would be very > inconvenient (= lots of work) to change the script to make an > exception just for that single line (because there's no easy way > to identify lines that produce the warning instead of an error). > > So the question is: Is it possible to turn only this one warning > into an error inside a dejagnu test? As I understand it, there > are no -W... switches for "enabled by default" options, and I > cannot use -Werror because that would break other tests in the > file.
For C, I recently added the -Wint-conversion option, so with recent enough GCC you should be able to use -Werror=int-conversion. Marek