This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should warnings be issued for unrecognised pragmas ?
- To: nickc at cygnus dot com (Nick Clifton)
- Subject: Re: Should warnings be issued for unrecognised pragmas ?
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Mon, 20 Oct 97 11:04:18 PDT
- Cc: jbuck at synopsys dot com, egcs at cygnus dot com
> 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.