public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51229] New: [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec
@ 2011-11-19 21:25 reichelt at gcc dot gnu.org
  2011-11-19 21:36 ` [Bug c++/51229] " reichelt at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-11-19 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51229
           Summary: [C++0x] [4.7 Regression] Broken diagnostic:
                    'integer_cst' not supported by dump_dec
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: reichelt@gcc.gnu.org


Trunk produces a broken error message for the following code snippet (using
"-std=c++0x"):

========================
struct A
{
  int i;
};

A a = { [0] {} };
========================

bug.cc:6:10: error: expected identifier before numeric constant
bug.cc:6:16: error: 'A' has no non-static data member named '#'integer_cst' not
supported by dump_decl#<declaration error>'


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

* [Bug c++/51229] [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec
  2011-11-19 21:25 [Bug c++/51229] New: [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec reichelt at gcc dot gnu.org
@ 2011-11-19 21:36 ` reichelt at gcc dot gnu.org
  2011-11-30 23:53 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-11-19 21:36 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

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


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

* [Bug c++/51229] [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec
  2011-11-19 21:25 [Bug c++/51229] New: [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec reichelt at gcc dot gnu.org
  2011-11-19 21:36 ` [Bug c++/51229] " reichelt at gcc dot gnu.org
@ 2011-11-30 23:53 ` pinskia at gcc dot gnu.org
  2011-12-06 14:07 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-11-30 23:53 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-11-30
     Ever Confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-11-30 23:35:03 UTC ---
Confirmed.


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

* [Bug c++/51229] [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec
  2011-11-19 21:25 [Bug c++/51229] New: [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec reichelt at gcc dot gnu.org
  2011-11-19 21:36 ` [Bug c++/51229] " reichelt at gcc dot gnu.org
  2011-11-30 23:53 ` pinskia at gcc dot gnu.org
@ 2011-12-06 14:07 ` rguenth at gcc dot gnu.org
  2011-12-07 12:05 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-06 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
      Known to work|                            |4.6.2

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-06 14:04:27 UTC ---
4.6 prints

> g++-4.6 -S -std=c++0x t.C
t.C:6:10: error: expected identifier before numeric constant
t.C:6:16: error: invalid conversion from ‘void (*)()’ to ‘int’ [-fpermissive]


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

* [Bug c++/51229] [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec
  2011-11-19 21:25 [Bug c++/51229] New: [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-12-06 14:07 ` rguenth at gcc dot gnu.org
@ 2011-12-07 12:05 ` jakub at gcc dot gnu.org
  2011-12-07 20:43 ` jakub at gcc dot gnu.org
  2011-12-07 20:48 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-07 12:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-07 12:04:46 UTC ---
Created attachment 26015
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26015
gcc47-pr51229.patch

Untested fix.

This patch doesn't deal with missing diagnostics for invalid:

struct A { int i; };

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" };

I'd prefer to leave that part to Jason.


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

* [Bug c++/51229] [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec
  2011-11-19 21:25 [Bug c++/51229] New: [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-12-07 12:05 ` jakub at gcc dot gnu.org
@ 2011-12-07 20:43 ` jakub at gcc dot gnu.org
  2011-12-07 20:48 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-07 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-07 20:43:12 UTC ---
Author: jakub
Date: Wed Dec  7 20:43:06 2011
New Revision: 182088

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182088
Log:
    PR c++/51229
    * decl.c (reshape_init_class): Complain if d->cur->index is
    INTEGER_CST.
    * parser.c (cp_parser_initializer_list): If cp_parser_parse_definitely
    fails, clear designator.

    * g++.dg/ext/desig3.C: New test.

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


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

* [Bug c++/51229] [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec
  2011-11-19 21:25 [Bug c++/51229] New: [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-12-07 20:43 ` jakub at gcc dot gnu.org
@ 2011-12-07 20:48 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-07 20:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-07 20:48:18 UTC ---
Fixed.


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

end of thread, other threads:[~2011-12-07 20:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-19 21:25 [Bug c++/51229] New: [C++0x] [4.7 Regression] Broken diagnostic: 'integer_cst' not supported by dump_dec reichelt at gcc dot gnu.org
2011-11-19 21:36 ` [Bug c++/51229] " reichelt at gcc dot gnu.org
2011-11-30 23:53 ` pinskia at gcc dot gnu.org
2011-12-06 14:07 ` rguenth at gcc dot gnu.org
2011-12-07 12:05 ` jakub at gcc dot gnu.org
2011-12-07 20:43 ` jakub at gcc dot gnu.org
2011-12-07 20:48 ` jakub 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).