From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0EC5D3858294; Tue, 2 Apr 2024 11:18:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0EC5D3858294 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712056681; bh=Mn++93ObmCK2exjmQm9OpAAAiFSKRbW7oTDPWlD/y3Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PIIwd+IcQn3pzdWaDjLLfuH+bd4t7GXutHhSrXoPsa8pfNITiRhHZi6vleAlKHpQM HLpEUbPsR8sXlgDuFMlP7H7w2LVDA9FguUG3mtqlTwf5h8If0gvkFkfAXfoELI6thO JcFMwnpmEah00vFpBPayeNBEdyRc+aY+cKnoZVcY= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57573] [C++1y] bogus "taking address of temporary" error Date: Tue, 02 Apr 2024 11:17:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: see_also cf_known_to_work Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D57573 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D60409 Known to work|4.10.0 |5.0 --- Comment #6 from Jonathan Wakely --- For the record, it started to fail with: commit 10c6dc8e3932d33c8e47e6706885d2412b29c069 [r0-122521-g10c6dc8e3932d3] Author: Jason Merrill Date: Fri Mar 29 19:51:36 2013 cp-tree.h (AUTO_IS_DECLTYPE): New. N3582 * cp-tree.h (AUTO_IS_DECLTYPE): New. * parser.c (cp_parser_decltype): Handle decltype(auto). (cp_parser_type_id_1): Allow auto without a late-specified return in C++1y. (cp_parser_primary_expression): Use the return value of finish_parenthesized_expr. (cp_parser_transaction_expression): Likewise. * semantics.c (force_paren_expr): New. (finish_parenthesized_expr): Use it. * call.c (build_conditional_expr_1): Likewise. * pt.c (do_auto_deduction): Handle decltype(auto). (tsubst_copy): Handle PAREN_EXPR. (tsubst_copy_and_build): Likewise. * error.c (dump_expr): Handle PAREN_EXPR. * cxx-pretty-print.c (pp_cxx_expression): Likewise. * mangle.c (write_expression): Ignore PAREN_EXPR. * parser.c (cp_parser_decltype_expr): Split out... (cp_parser_decltype): ...from here. From-SVN: r197248 That commit also caused an ICE, and then this bug and the ICE were both fix= ed by: commit f9b381b8eb56252e302b88ea4fe89beffc33cf80 [r0-128726-gf9b381b8eb5625] Author: Jason Merrill Date: Wed Mar 5 19:25:37 2014 re PR c++/60409 ([c++1y] ICE on valid with template function) PR c++/60409 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a dependent expression. From-SVN: r208352=