This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61614] New: [4.9/4.10 Regression] Bogus error: taking address of temporary array
- From: "ppluzhnikov at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jun 2014 20:36:15 +0000
- Subject: [Bug c++/61614] New: [4.9/4.10 Regression] Bogus error: taking address of temporary array
- Auto-submitted: auto-generated
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
^