Should warnings be issued for unrecognised pragmas ?
Joe Buck
jbuck@synopsys.com
Mon Oct 20 13:24:00 GMT 1997
> Oh, sorry. So what you are really saying is that -Wall should not
> warn about unknown pragmas unless there is an easy way to avoid or
> prevent the warning, and that using conditional compilation is not the
> solution because there are just too many places where it would be
> needed in the "Effective C++" class library, right ?
Conditional compilation is no problem (it does not make the code worse).
> Does doing:
>
> -Wall -Wno-unknown-pragmas
>
> count as avoiding the warnings, and if so, is it an acceptible
> solution ?
Yes, that's acceptable in this case (since people who want to just say
"-Wall" can surround the unknown pragmas with #ifdefs). The cases
where I think -Wall -Wno-<flag> is unacceptable is if there is no
way to have just -Wall work without making the object code worse.
More information about the Gcc
mailing list