public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/28368] -std=c89 doesn't warn about gcc's "?:" extension
Date: Wed, 07 Mar 2007 18:04:00 -0000	[thread overview]
Message-ID: <20070307180438.672.qmail@sourceware.org> (raw)
In-Reply-To: <bug-28368-838@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from joseph at codesourcery dot com  2007-03-07 18:04 -------
Subject: Re:  -std=c89 doesn't warn about gcc's "?:" extension

On Wed, 7 Mar 2007, manu at gcc dot gnu dot org wrote:

> The documentation says that you should use -pedantic to warn about GCC
> extensions[*], so I am not sure whether this is valid. But honestly, from the
> description of "-std=", I would understand that GNU extensions are disabled
> when using -std=c89 or that pedantic does not warn for them when using
> -std=gnu89, but neither of those are true.

The key concept is that of base standard, as described in this passage 
from invoke.texi:

Where the standard specified with @option{-std} represents a GNU
extended dialect of C, such as @samp{gnu89} or @samp{gnu99}, there is a
corresponding @dfn{base standard}, the version of ISO C on which the GNU
extended dialect is based.  Warnings from @option{-pedantic} are given
where they are required by the base standard.  (It would not make sense
for such warnings to be given only for features not in the specified GNU
C dialect, since by definition the GNU dialects of C include all
features the compiler supports with the given option, and there would be
nothing to warn about.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28368


  parent reply	other threads:[~2007-03-07 18:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-13  6:28 [Bug c/28368] New: gcc-bugzilla at gcc dot gnu dot org
2007-03-07 14:48 ` [Bug c/28368] -std=c89 doesn't warn about gcc's "?:" extension lloyd at randombit dot net
2007-03-07 17:57 ` manu at gcc dot gnu dot org
2007-03-07 18:04 ` joseph at codesourcery dot com [this message]
2007-03-07 18:11 ` manu at gcc dot gnu dot org
2007-03-07 21:06 ` joseph at codesourcery dot com
2007-03-08 15:52 ` manu at gcc dot gnu dot org
2008-01-18 12:46 ` manu at gcc dot gnu dot org
2008-02-16 16:30 ` manu at gcc dot gnu dot org
2008-02-16 18:16 ` manu at gcc dot gnu dot org
2008-02-16 18:21 ` manu at gcc dot gnu dot org

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=20070307180438.672.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).