public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Should warnings be issued for unrecognised pragmas ?
@ 1997-10-16 16:07 Nick Clifton
  1997-10-17  2:31 ` Andreas Schwab
  1997-10-17 14:36 ` Donald Koch
  0 siblings, 2 replies; 22+ messages in thread
From: Nick Clifton @ 1997-10-16 16:07 UTC (permalink / raw)
  To: egcs

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 ?

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

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re:  Should warnings be issued for unrecognised pragmas ?
@ 1997-10-17 13:57 meissner
  1997-10-17 14:36 ` Joe Buck
  1997-10-17 14:36 ` Nick Clifton
  0 siblings, 2 replies; 22+ messages in thread
From: meissner @ 1997-10-17 13:57 UTC (permalink / raw)
  To: egcs, nickc

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

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re:  Should warnings be issued for unrecognised pragmas ?
@ 1997-10-17 15:51 Mike Stump
  0 siblings, 0 replies; 22+ messages in thread
From: Mike Stump @ 1997-10-17 15:51 UTC (permalink / raw)
  To: jbuck, meissner; +Cc: egcs, nickc

> From: Joe Buck <jbuck@synopsys.com>
> Date: Fri, 17 Oct 97 14:36:46 PDT

> It's a minor point, but why not allow the British spelling as a
> synonym?

I am against this.  We need to pick a predictable spelling, a
canonical one, and use it and stick to it.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re:  Should warnings be issued for unrecognised pragmas ?
@ 1997-10-17 19:44 James L. Dein
  0 siblings, 0 replies; 22+ messages in thread
From: James L. Dein @ 1997-10-17 19:44 UTC (permalink / raw)
  To: jbuck, meissner, mrs; +Cc: egcs, nickc

>  From owner-egcs@cygnus.com Fri Oct 17 19:05 PDT 1997
>  Date: Fri, 17 Oct 1997 15:50:56 -0700
>  From: mrs@wrs.com (Mike Stump)
>  To: jbuck@synopsys.com, meissner@cygnus.com
>  Subject: Re:  Should warnings be issued for unrecognised pragmas ?
>  Cc: egcs@cygnus.com, nickc@cygnus.com
>  
>  > From: Joe Buck <jbuck@synopsys.com>
>  > Date: Fri, 17 Oct 97 14:36:46 PDT
>  
>  > It's a minor point, but why not allow the British spelling as a
>  > synonym?
>  
>  I am against this.  We need to pick a predictable spelling, a
>  canonical one, and use it and stick to it.

How about "unknown-pragmas"?  Same spelling on every side of the Atlantic (and 
other oceans).

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: Should warnings be issued for unrecognised pragmas ?
@ 1997-10-20 10:32 Nick Clifton
  0 siblings, 0 replies; 22+ messages in thread
From: Nick Clifton @ 1997-10-20 10:32 UTC (permalink / raw)
  To: richard.earnshaw; +Cc: egcs

> Date: Sat, 18 Oct 1997 11:05:19 +0100
> From: Richard Earnshaw <rearnsha@arm.com>
> 
> How about -Wunknown-pragmas ?  It's also shorter.
> 
> Richard.

An excellent idea.  I have made the change.

Nick


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~1997-10-20 13:24 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-16 16:07 Should warnings be issued for unrecognised pragmas ? Nick Clifton
1997-10-17  2:31 ` Andreas Schwab
1997-10-17 14:36 ` Donald Koch
1997-10-17 15:05   ` Nick Clifton
1997-10-17 15:06     ` Donald Koch
1997-10-17 15:06       ` Nick Clifton
1997-10-18 12:56         ` Joe Buck
1997-10-20 10:32           ` Nick Clifton
1997-10-20 10:43             ` Joe Buck
1997-10-20 10:49               ` Nick Clifton
1997-10-20 13:24                 ` Joe Buck
1997-10-17 13:57 meissner
1997-10-17 14:36 ` Joe Buck
1997-10-17 15:05   ` Nick Clifton
1997-10-17 19:44     ` Joe Buck
1997-10-19  5:54       ` Dave Love
1997-10-18  3:04     ` Richard Earnshaw
1997-10-17 15:06   ` Nick Clifton
1997-10-17 14:36 ` Nick Clifton
1997-10-17 15:51 Mike Stump
1997-10-17 19:44 James L. Dein
1997-10-20 10:32 Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).