public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Carlo Wood <carlo@runaway.xs4all.nl>
To: andi@zero.aec dot@(Andi Kleen)
Cc: egcs@cygnus.com (egcs@cygnus.com)
Subject: Re: Desire gcc option to skip warnings in standard headers
Date: Wed, 01 Jul 1998 00:54:00 -0000	[thread overview]
Message-ID: <199807010111.DAA30576@jolan.ppro> (raw)
In-Reply-To: <19980630145900.23408.qmail@zero.aec.at>

| >  > A #pragma seems more logical, and more flexible too.
| >pragmas are generally frowned upon in gcc.  You'll have a hard time
| >convincing anyone to accept new ones.
| 
| Many of the reasons why pragmas are disliked (not usable in macros
| etc.) are gone with the ISO C9x _Pragma() construct. Of course there
| could be still name collisions of pragma names with other compilers, 
| but that can be easily fixed which a #ifdef (and __attribute__ needs 
| #ifdef magic too)

The reason I thought about #pragma's is because it is more flexible:
allows to turn on and off particular warnings at any line number.
The use of -Woptions are effective for every file and line number.

I don't really care to have the possibility to turn warnings on and off
though, except when it is impossible to write good code that doesn't
cause the warning.  I always use -Wall -Woverloaded-virtual
-Wpointer-arith -Winline -Werror anyway.
There are only a few cases sometimes a bit annoying, like the
"might be used uninitialized".

Having broken system headers is of course a whole different story:
Not everyone is sys admin and able to fix them.

The -Wno-system-headers is actually very good solution to real
problem as originally posted :).

-- 
 Carlo Wood  <carlo@runaway.xs4all.nl>

  reply	other threads:[~1998-07-01  0:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-26 13:03 Frederick W. Wheeler
1998-06-29  8:41 ` Branko Cibej
1998-06-29  8:41   ` Carlo Wood
1998-06-29  8:41     ` Branko Cibej
1998-06-29 20:41       ` Carlo Wood
1998-06-30  0:00         ` Jeffrey A Law
1998-06-30  9:03           ` Andi Kleen
1998-07-01  0:54             ` Carlo Wood [this message]
1998-06-30 23:15           ` Mumit Khan
1998-07-01 20:15             ` Raja R Harinath
1998-06-30  0:42         ` Branko Cibej
1998-06-30  0:42       ` Jeffrey A Law
1998-06-30  9:03         ` Branko Cibej
1998-06-29  9:38   ` Branko Cibej
     [not found] <9806261352.AA18188.cygnus.egcs@ipl.rpi.edu>
1998-07-01 20:15 ` Nathan Myers
1998-07-04 12:40   ` Joseph H. Buehler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199807010111.DAA30576@jolan.ppro \
    --to=carlo@runaway.xs4all.nl \
    --cc=andi@zero.aec \
    --cc=egcs@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).