public inbox for
 help / color / mirror / Atom feed
From: Jonathan Wakely <>
To: Richard Biener <>
Cc: Nathan Sidwell <>,
Subject: Re: [libibery PATCH] Fix bootstrap
Date: Thu, 25 May 2017 13:03:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 25/05/17 14:35 +0200, Richard Biener wrote:
>On May 25, 2017 1:38:36 PM GMT+02:00, Nathan Sidwell <> wrote:
>>On 05/25/2017 07:21 AM, Jonathan Wakely wrote:
>>> I don't mind removing the warning again if preferred. I thought it
>>> useful (as we already warn for ignored const in return types).
>>Oh yeah, I recall noticing we did that (and noting we didn't warn
>>elsewhere).  This new warning seems consistent.
>>I say leave it in unless the grumbling gets too much for you :)
>I wonder if we can somehow default to -Wno-error=xyz for such kind of 'style' warnings...  Adding const can't possibly break anything or result in wrong expectations, can it?

Now that G++ correctly ignores the const it can't change (or break)
anything to add const in the cast.

Before I fixed PR 80544, the presence/absence of the const affected
the generated code and could result in e.g. different overloaded
functions being called (in some fairly obscure cases).

The original report I got was and GCC was
giving different behaviour to all other C++ compilers (which ignored
the const and so failed the static assertion).

The warning is just saying "hey, you know what you wrote is going to
be ignored, right?" That's a bit like "statement has no effect"
warnings, although those warnings are usually because you mistyped
something and so find real bugs.

      reply	other threads:[~2017-05-25 13:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25  0:56 Nathan Sidwell
2017-05-25  1:13 ` Nathan Sidwell
2017-05-25  1:22   ` Nathan Sidwell
2017-05-25  1:42     ` Nathan Sidwell
2017-05-25  6:25       ` Richard Biener
2017-05-25 10:58         ` Nathan Sidwell
2017-05-25 11:21           ` Jonathan Wakely
2017-05-25 11:22             ` Jonathan Wakely
2017-05-25 12:35               ` Nathan Sidwell
2017-05-25 13:01                 ` Richard Biener
2017-05-25 13:03                   ` Jonathan Wakely [this message]

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:

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

  git send-email \ \ \ \ \ \

* 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).