public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: Marek Polacek <polacek@redhat.com>,
	 GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: C PATCH to rectify warning for character types (PR c/23087)
Date: Sat, 09 Jan 2016 01:21:00 -0000	[thread overview]
Message-ID: <569060A2.8090101@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1601082342120.22470@digraph.polyomino.org.uk>

> The point of this warning is that there are certain cases of incompatible
> types that are less serious than others - namely, those where the only
> aspect of the type that is different is its signedness.  Those get a more
> specific warning, which is given under more restrictive conditions.

I see.  It means the warnings aren't based on the C definitions
of signedness or compatibility but rather on our perception of
the likely correctness of the code we've seen violate the
constraints implied by the definitions.

FWIW, I have no objection to treating the three character types
as special as you suggest.  But I also feel that -Wincompatible-
pointer-types is more appropriate than -Wpointer-sign, not only
for the reason stated in the bug but also because it more closely
corresponds to the C definitions of the terms.  Perhaps tweaking
the patch by adding an option, say -Wincompatible-char, to make
it possible to enable and disable the warning for the character
types, would be an acceptable compromise.  It would satisfy
the user's request and avoid the potential fallout you and Marek
are concerned about.

Martin

  reply	other threads:[~2016-01-09  1:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07 17:11 Marek Polacek
2016-01-07 21:19 ` Joseph Myers
2016-01-08 17:49   ` Martin Sebor
2016-01-08 22:27     ` Joseph Myers
2016-01-08 23:28       ` Martin Sebor
2016-01-08 23:51         ` Joseph Myers
2016-01-09  1:21           ` Martin Sebor [this message]
2016-01-11 16:37             ` Martin Sebor
2016-01-08 17:54   ` Bernd Schmidt
2016-01-08 18:07     ` Marek Polacek

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=569060A2.8090101@gmail.com \
    --to=msebor@gmail.com \
    --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).