public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51458] New: [4.7 Regression] Accepts invalid designated initializers
@ 2011-12-07 20:53 jakub at gcc dot gnu.org
  2011-12-07 20:54 ` [Bug c++/51458] " jakub at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-07 20:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51458

             Bug #: 51458
           Summary: [4.7 Regression] Accepts invalid designated
                    initializers
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: jakub@gcc.gnu.org, jason@gcc.gnu.org,
                    reichelt@gcc.gnu.org
        Depends on: 51229


+++ This bug was initially created as a clone of Bug #51229 +++

int a = { .foo = 6 };
int b = { [0] = 1 };
_Complex float c = { .foo = 0,  1 };
_Complex float d = { [0] = 0,  1 };
_Complex float e = { 0, .foo = 1 };
_Complex float f = { 0, [0] = 1 };
char g[] = { [7] = "abcd" };

should have all initializers rejected, but instead it ignores the designators
and accepts it.  The C FE rejects all but the last one.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/51458] [4.7 Regression] Accepts invalid designated initializers
  2011-12-07 20:53 [Bug c++/51458] New: [4.7 Regression] Accepts invalid designated initializers jakub at gcc dot gnu.org
@ 2011-12-07 20:54 ` jakub at gcc dot gnu.org
  2011-12-14 23:28 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-07 20:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51458

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/51458] [4.7 Regression] Accepts invalid designated initializers
  2011-12-07 20:53 [Bug c++/51458] New: [4.7 Regression] Accepts invalid designated initializers jakub at gcc dot gnu.org
  2011-12-07 20:54 ` [Bug c++/51458] " jakub at gcc dot gnu.org
@ 2011-12-14 23:28 ` jason at gcc dot gnu.org
  2011-12-15 21:56 ` jason at gcc dot gnu.org
  2011-12-15 21:58 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-12-14 23:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51458

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-12-14
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/51458] [4.7 Regression] Accepts invalid designated initializers
  2011-12-07 20:53 [Bug c++/51458] New: [4.7 Regression] Accepts invalid designated initializers jakub at gcc dot gnu.org
  2011-12-07 20:54 ` [Bug c++/51458] " jakub at gcc dot gnu.org
  2011-12-14 23:28 ` jason at gcc dot gnu.org
@ 2011-12-15 21:56 ` jason at gcc dot gnu.org
  2011-12-15 21:58 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-12-15 21:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51458

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-12-15 21:56:00 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/51458] [4.7 Regression] Accepts invalid designated initializers
  2011-12-07 20:53 [Bug c++/51458] New: [4.7 Regression] Accepts invalid designated initializers jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-12-15 21:56 ` jason at gcc dot gnu.org
@ 2011-12-15 21:58 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-12-15 21:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51458

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2011-12-15 21:55:35 UTC ---
Author: jason
Date: Thu Dec 15 21:55:31 2011
New Revision: 182391

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182391
Log:
    PR c++/51458
    * decl.c (has_designator_problem): New.
    (reshape_init_r): Check for improper use of
    designated initializers.

Added:
    trunk/gcc/testsuite/g++.dg/ext/desig4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-15 21:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-07 20:53 [Bug c++/51458] New: [4.7 Regression] Accepts invalid designated initializers jakub at gcc dot gnu.org
2011-12-07 20:54 ` [Bug c++/51458] " jakub at gcc dot gnu.org
2011-12-14 23:28 ` jason at gcc dot gnu.org
2011-12-15 21:56 ` jason at gcc dot gnu.org
2011-12-15 21:58 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).