public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Daniel Krügler" <daniel.kruegler@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Disable -Wctor-dtor-privacy warnings for some standard types
Date: Sat, 15 Jun 2019 12:14:00 -0000	[thread overview]
Message-ID: <CAGNvRgAHdSuq8KamV-b0Q8oq268yd0BXaVaeOyT6vOvk=haEkA@mail.gmail.com> (raw)
In-Reply-To: <CAGNvRgCo6E55FGHXgQLqU+7cMpyLX1QxUw1pWaOQ3CcZFF1Zfw@mail.gmail.com>

Am Sa., 15. Juni 2019 um 12:52 Uhr schrieb Daniel Krügler
<daniel.kruegler@gmail.com>:
>
> Am Fr., 14. Juni 2019 um 16:05 Uhr schrieb Jonathan Wakely <jwakely@redhat.com>:
> >
> > These types are not constructible by design, so we never want warnings
> > for them, even with -Wsystem-headers.
> >
> >         * include/experimental/type_traits (experimental::nonesuch): Use
> >         pragma to disable -Wctor-dtor-privacy warnings.
> >         * include/std/type_traits (__is_convertible_helper<From, To, false>)
> >         (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
> >
> > Tested x86_64-linux, committed to trunk.
>
> Unless I'm misunderstanding something, __nonesuchbase (twice) would
> not be affected by that warning, so maybe the start of the
> corresponding warning suppression could be moved after their
> definition? Or did you do it that way to keep __nonesuchbase and
> nonesuch close together?

Jonathan is momentarily not able to respond to this list using proper
email format, but he responded to me in private as follows:

"I did do that to keep them together, rather than introducing white
space between the base and the class using it. I even considered
putting the pragmas around the whole file, but decided to add them
just locally where needed.

I don't mind moving the base struct out of the pragma if you or
anybody else feels strongly, but thought it didn't do any harm this
way."

Personally I don't feel strongly about it - Thanks for the explanation!

- Daniel

      reply	other threads:[~2019-06-15 12:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 14:05 Jonathan Wakely
2019-06-15 10:53 ` Daniel Krügler
2019-06-15 12:14   ` Daniel Krügler [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:
  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='CAGNvRgAHdSuq8KamV-b0Q8oq268yd0BXaVaeOyT6vOvk=haEkA@mail.gmail.com' \
    --to=daniel.kruegler@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@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).