Can you disable warnings individually?
Jeffrey A Law
law@cygnus.com
Thu Sep 30 23:56:00 GMT 1999
In message < 009801befafb$90fede30$8e879dd1@lovehammer.tellme.com >you write:
> I'm using gcc 2.7.2 and I am specifically looking to disable the warning
> "taking address of temporary". I am currently using -Wall, and I'd like to
> just disable that warning and no others.
>
> The manual is a bit more informative than the man pages, but only just.
>
> I grepped through the 2.7.2.3 source code to try and figure out where the
> warning was triggered, and which "no warning" flag was being checked, but I
> couldn't find anything. (I also looked for one word at a time, in case the
> warning was not expressed as a single static string.)
>
> So, any ideas on what the proper -Wno-xxxxx switch is for "warning: taking
> address of temporary" ?
In the current sources that warning seems to come from
cp/typeck.c::build_x_unary_op and there seems to be no way to avoid the
warning.
Sorry,
jeff
More information about the Gcc-help
mailing list