public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Marek Polacek <polacek@redhat.com>, <gcc@gcc.gnu.org>
Subject: Re: -Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?
Date: Thu, 10 Nov 2022 23:33:14 +0000	[thread overview]
Message-ID: <ca5c113-3d3b-bcde-89d7-daa3cae10ff@codesourcery.com> (raw)
In-Reply-To: <87h6z6sjqp.fsf@oldenburg.str.redhat.com>

On Thu, 10 Nov 2022, Florian Weimer via Gcc wrote:

> I assumed that there was a rule similar to the the rule for #error for
> any kind of diagnostic, which would mean that GCC errors are diagnostic
> messages in the sense of the standard, but GCC warnings are not.

The rule (for C) is that any diagnostic required by the standard should 
either be a warning or a pedwarn (where -pedantic-errors turns the latter 
but not the former into errors).

There are a few cases where -pedantic enables warnings that aren't 
pedwarns because they aren't required by the standard; for example, 
-Wformat -pedantic warnings for use of printf format extensions.

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2022-11-10 23:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 18:25 Florian Weimer
2022-11-10 18:43 ` Marek Polacek
2022-11-10 19:16   ` Florian Weimer
2022-11-10 23:05     ` Jonathan Wakely
2022-11-10 23:33     ` Joseph Myers [this message]
2022-11-11  9:21     ` David Brown

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=ca5c113-3d3b-bcde-89d7-daa3cae10ff@codesourcery.com \
    --to=joseph@codesourcery.com \
    --cc=fweimer@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=polacek@redhat.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).