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 ?


| I am currently writting a patch for gcc2 that implements a new command
| line option '-wunrecognised-pragmas' which will cause warning messages
| to be generated when GCC encounters pragmas which is does not handle.
| At the moment this patch also enables these warnings if -Wall is
| enabled, expect for the case where the pragmas are in system header
| files.   Is this the right thing to do ?

Please change -wunrecognised-pragmas to -Wunrecognized-pragmas for consistancy.

| The '89 ANSI C standard says:
| "Any pragma that is not recognized by the implementation is ignored."
| 
| It is my opinion that "ignoring" is not the same as "not issuing a
| warning", if such warnings have been requested, and that it is
| important to know if a compiler is ignoring pragmas as they may have
| been intended to affect code generation.
| 
| Any comments ?
| 
| Nick Clifton
| 


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