This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53220] [4.7/4.8 Regression] g++ mis-compiles compound literals
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 26 May 2012 21:13:27 +0000
- Subject: [Bug c++/53220] [4.7/4.8 Regression] g++ mis-compiles compound literals
- Auto-submitted: auto-generated
- References: <bug-53220-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53220
--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> 2012-05-26 21:13:27 UTC ---
Author: jason
Date: Sat May 26 21:13:23 2012
New Revision: 187916
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187916
Log:
PR c++/53220
gcc/
* c-typeck.c (array_to_pointer_conversion): Give -Wc++-compat warning
about array compound literals.
gcc/cp/
* call.c (convert_like_real) [ck_list]: Take array address directly.
* typeck.c (decay_conversion): Reject decay of an array compound
literal.
Added:
trunk/gcc/testsuite/c-c++-common/array-lit.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-typeck.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/typeck.c
trunk/gcc/doc/extend.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ext/complit12.C