public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/111264] [14 regression] gcc.dg/plugin/analyzer_cpython_plugin.c breaks after r14-3580-g597b9ec69bca8a
Date: Fri, 01 Sep 2023 03:07:05 +0000	[thread overview]
Message-ID: <bug-111264-4-X5yhHq60qB@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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-09-01

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Hans-Peter Nilsson from comment #1)
> Also seen for cris-elf and m68k-linux
> (https://gcc.gnu.org/pipermail/gcc-testresults/2023-August/794806.html).
> 
> Some experimentation says that this is a mismatch between the default C++
> version for the host/installed gcc (for me, C++11, I think) and the target
> (C++17, right?).  If you add "-std=c++17" to the invocation line in gcc.log,
> compilation succeeds.  Or, change the form of the newly introduced
> declarations from
>  auto foobar = foo<bar>();
> to
>  foo<bar> foobar;
> Not sure why the former is used, it seems negate the benefits of auto and
> just be more typing.  Beware: since I know Very Little C++ of the last
> decades, I could be completely wrong.

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.

  parent reply	other threads:[~2023-09-01  3:07 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 [this message]
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
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-X5yhHq60qB@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).