public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "richard-gccbugzilla at metafoo dot co.uk" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59950] New: Bogus diagnostic "taking address of temporary" taking address of trivial no-op assignment to temporary Date: Sun, 26 Jan 2014 19:40:00 -0000 [thread overview] Message-ID: <bug-59950-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59950 Bug ID: 59950 Summary: Bogus diagnostic "taking address of temporary" taking address of trivial no-op assignment to temporary Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: richard-gccbugzilla at metafoo dot co.uk GCC rejects this valid code: struct Foo {}; int f(Foo *p); int n = f(&(Foo() = Foo())); ... saying ... <stdin>:3:27: error: taking address of temporary [-fpermissive] The incorrect diagnostic only appears if 'Foo' is empty and its assignment operator is defaulted. (Maybe the assignment is getting folded away before the check is performed?) Google ref b/12744615
next reply other threads:[~2014-01-26 19:40 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-01-26 19:40 richard-gccbugzilla at metafoo dot co.uk [this message] 2014-01-26 21:52 ` [Bug c++/59950] " richard-gccbugzilla at metafoo dot co.uk 2015-03-19 10:05 ` paolo.carlini at oracle dot com 2021-12-02 4:47 ` [Bug c++/59950] [9/10/11/12 Regression] Bogus diagnostic "taking address of temporary" taking address of trivial no-op assignment to temporary with empty class pinskia at gcc dot gnu.org 2021-12-02 4:59 ` pinskia at gcc dot gnu.org 2021-12-02 5:04 ` pinskia at gcc dot gnu.org 2022-01-24 4:45 ` jason at gcc dot gnu.org 2022-01-25 19:28 ` cvs-commit at gcc dot gnu.org 2022-01-25 19:32 ` [Bug c++/59950] [9/10/11 " jason at gcc dot gnu.org 2022-03-18 13:32 ` ppalka at gcc dot gnu.org 2022-03-22 5:18 ` cvs-commit at gcc dot gnu.org 2022-03-26 23:27 ` [Bug c++/59950] [9/10 " jason at gcc dot gnu.org 2022-05-12 21:15 ` cvs-commit at gcc dot gnu.org 2022-05-13 17:41 ` [Bug c++/59950] [9 " cvs-commit at gcc dot gnu.org 2022-05-13 17:49 ` jason at gcc dot gnu.org 2022-07-31 8:50 ` redi 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-59950-4@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: linkBe 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).