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: jbuck at synopsys dot com
- Subject: Re: Should warnings be issued for unrecognised pragmas ?
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Mon, 20 Oct 1997 10:53:55 -0700
- CC: egcs at cygnus dot com
> From: Joe Buck <jbuck@synopsys.com>
> Date: Mon, 20 Oct 97 10:43:41 PDT
>
> > > From: Joe Buck <jbuck@synopsys.com>
> > > Date: Sat, 18 Oct 97 12:55:55 PDT
> > >
> > > Because large numbers of people use -Wall all the time on every build,
> > > no warning should be added to -Wall that cannot be suppressed without
> > > making the code worse. Since it's easy to supress compiler-specific
> > > pragmas belonging to other compilers with #ifdef __Green_Hills__ or
> > > the like, I don't care in this case whether -Wall objects or not.
> > > So -Wunrecognized_pragmas could be in -Wall. On the other hand,
> > > some of the "Effective C++" warnings can't be suppressed without
> > > making some classes needlessly larger, so they can't be in -Wall.
> > >
> >
> > Can you tell me what these pragmas are, then I can make sure that the
> > patch will not generate warnings for them. I assume that it is OK for
> > GCC to ignore these pragmas ?
>
> You misunderstood me, I think. I have no problem with warning about
> all unrecognized pragmas in -Wall . I was just talking about general
> philosophy (put stuff in -Wall only if the user can always avoid the
> warning without penalty).
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 ?
Does doing:
-Wall -Wno-unknown-pragmas
count as avoiding the warnings, and if so, is it an acceptible
solution ?
Nick