This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61614] [4.9/4.10 Regression] Bogus error: taking address of temporary array
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Jun 2014 09:57:55 +0000
- Subject: [Bug c++/61614] [4.9/4.10 Regression] Bogus error: taking address of temporary array
- Auto-submitted: auto-generated
- References: <bug-61614-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61614
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
It's r204228:
2013-10-30 Jason Merrill <jason@redhat.com>
* semantics.c (finish_compound_literal): Don't create a static variable
inside cp_unevaluated_operand.
indeed, the error happens in decay_conversion in:
if (TREE_CODE (exp) == TARGET_EXPR)
{
if (complain & tf_error)
error_at (loc, "taking address of temporary array");
where we have a TARGET_EXPR (vs a VAR_DECL).