public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Marek Polacek <polacek@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH] c: Implement new -Wenum-int-mismatch warning [PR105131]
Date: Wed, 18 May 2022 11:14:25 +0100	[thread overview]
Message-ID: <f4b0cb59-83f2-8e09-3a15-85c582cbafb4@palves.net> (raw)
In-Reply-To: <20220517235629.473087-1-polacek@redhat.com>

On 2022-05-18 00:56, Marek Polacek via Gcc-patches wrote:

> +In C, an enumerated type is compatible with @code{char}, a signed
> +integer type, or an unsigned integer type.  However, since the choice
> +of the underlying type of an enumerated type is implementation-defined,
> +such mismatches may cause portability issues.  In C++, such mismatches
> +are an error.  In C, this warning is enabled by @option{-Wall}.

Should it also be enabled by -Wc++-compat?

Pedro Alves

  reply	other threads:[~2022-05-18 10:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 23:56 Marek Polacek
2022-05-18 10:14 ` Pedro Alves [this message]
2022-05-18 14:48   ` [PATCH v2] " Marek Polacek
2022-05-18 20:58     ` Joseph Myers
2022-05-18 21:51       ` [PATCH v3] " Marek Polacek
2022-05-18 22:25         ` Joseph Myers

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=f4b0cb59-83f2-8e09-3a15-85c582cbafb4@palves.net \
    --to=pedro@palves.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --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).