public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hp at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/111264] [14 regression] gcc.dg/plugin/analyzer_cpython_plugin.c breaks after r14-3580-g597b9ec69bca8a
Date: Fri, 01 Sep 2023 13:30:59 +0000	[thread overview]
Message-ID: <bug-111264-4-wpiNYSI5pQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111264-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111264

--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> You are mostly correct.
> In C++17, Copy elision is guaranteed to be done here while in earlier
> versions it is not and earlier versions of C++ require a copy/move
> constructor even if copy elision is to be done. See
> https://en.cppreference.com/w/cpp/language/copy_elision for more information.

So before this "copy elision", there'd be temporaries constructed and then
copied into other temporaries, this in an object that is essentially just
declared, without initializer?  Weird.  Thanks for the pointer; I guess that's
the general idea, but here there'd be no difference.  IOW, sounds like the
patch is right.

If we move past the difference in semantics of the idioms in the patch, I still
don't see why there actually was error for the original syntax.  There must be
something in the difference between the hash_map and hash_set declarations. 
Eagerly awaiting comments on the patch.  (Probably not the best way to learn
recent C++ standards, but believe it or not, I'm exposed to a worse way, on
another track... :)

  parent reply	other threads:[~2023-09-01 13:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 23:22 [Bug other/111264] New: " seurer at gcc dot gnu.org
2023-09-01  2:09 ` [Bug other/111264] " hp at gcc dot gnu.org
2023-09-01  2:52 ` hp at gcc dot gnu.org
2023-09-01  3:07 ` pinskia at gcc dot gnu.org
2023-09-01  7:07 ` [Bug analyzer/111264] " rguenth at gcc dot gnu.org
2023-09-01 13:30 ` hp at gcc dot gnu.org [this message]
2023-09-01 18:59 ` [Bug testsuite/111264] " hp at gcc dot gnu.org
2023-09-01 19:01 ` cvs-commit at gcc dot gnu.org
2023-09-01 19:10 ` hp at gcc dot gnu.org
2023-09-01 19:11 ` hp at gcc dot gnu.org
2023-09-01 21:32 ` efric at gcc dot gnu.org

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=bug-111264-4-wpiNYSI5pQ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).