This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Should warnings be issued for unrecognised pragmas ?



> 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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]