This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61614] [4.9/4.10 Regression] Bogus error: taking address of temporary array


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]