http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196
--- Comment #8 from Jakub Jelinek 2012-06-12
21:16:24 UTC ---
Author: jakub
Date: Tue Jun 12 21:16:20 2012
New Revision: 188483
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188483
Log:
PR c/53532
PR c/51034
PR c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196
--- Comment #8 from Jakub Jelinek 2012-06-12
21:16:24 UTC ---
Author: jakub
Date: Tue Jun 12 21:16:20 2012
New Revision: 188483
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188483
Log:
PR c/53532
PR c/51034
PR c/53196
*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196
--- Comment #7 from Jonathan Wakely 2012-05-02
21:21:49 UTC ---
Actually, I'm wrong, G++ does still support compound literals, but only with a
non-empty initializer. Maybe I'll open a separate bug for that.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196
--- Comment #6 from Jonathan Wakely 2012-05-02
21:17:01 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > That's simply because compound literals aren't valid in C++.
>
> So this page is wrong?
> http://gcc.gnu.org/onlinedocs/gcc/
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196
Manuel López-Ibáñez changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196
--- Comment #4 from joseph at codesourcery dot com 2012-05-02 19:59:46 UTC ---
On Wed, 2 May 2012, redi at gcc dot gnu.org wrote:
> Also, to be valid C the initializer should be { 0 }, allowing an empty
> initializer is a GNU C extension.
And in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196
--- Comment #3 from Manuel López-Ibáñez 2012-05-02
19:52:08 UTC ---
(In reply to comment #2)
> That's simply because compound literals aren't valid in C++.
So this page is wrong?
http://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196
--- Comment #2 from Jonathan Wakely 2012-05-02
19:32:03 UTC ---
(In reply to comment #1)
> Interestingly, the code without the typo:
>
> struct foo {
> int i;
> };
>
> int
> main(void)
> {
> struct foo f = (struct foo) { };
> return 0;
>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196
Manuel López-Ibáñez changed:
What|Removed |Added
CC||manu at gcc dot gnu.org
--- Comment