https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61614

            Bug ID: 61614
           Summary: [4.9/4.10 Regression] Bogus error: taking address of
                    temporary array
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Google ref: b/15883782

This broke on trunk sometime after r200178, is broken currently (r211990), and
also on gcc-4_9-branch.

// --- cut ---
int Fn (...);

void
Test ()
{
  int j = Fn ((const int[]) { 0 });                    // OK
  unsigned long sz = sizeof Fn ((const int[]) { 0 });  // Error
}
// --- cut ---


gcc-svn-r211990/bin/g++ -c t.ii
t.ii: In function 'void Test()':
t.ii:7:52: error: taking address of temporary array
   unsigned long sz = sizeof Fn ((const int[]) { 0 });  // Error
                                                    ^

Reply via email to