[Bug c++/51786] [c++0x] Invalid declaration with decltype accepted

2013-07-09 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51786

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |4.9.0

--- Comment #8 from Paolo Carlini  ---
Fixed for 4.9.0.


[Bug c++/51786] [c++0x] Invalid declaration with decltype accepted

2013-07-07 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51786

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com

--- Comment #7 from Paolo Carlini  ---
On it.


[Bug c++/51786] [c++0x] Invalid declaration with decltype accepted

2013-07-06 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51786

Paolo Carlini  changed:

   What|Removed |Added

 CC||0coming.soon at gmail dot com

--- Comment #6 from Paolo Carlini  ---
*** Bug 57502 has been marked as a duplicate of this bug. ***


[Bug c++/51786] [c++0x] Invalid declaration with decltype accepted

2012-10-16 Thread paolo.carlini at oracle dot com


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



--- Comment #5 from Paolo Carlini  2012-10-16 
10:49:22 UTC ---

The problem is that by the time at the end of cp_parser_simple_declaration we

call check_tag_decl (via shadow_tag), which is supposed to check that the

simple declaration is valid, we already called finish_decltype_type thus it

doesn't see the decltype, it sees something like:



void foo() { struct A; }



a valid simple declaration.


[Bug c++/51786] [c++0x] Invalid declaration with decltype accepted

2012-01-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51786

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-01-31
 CC|paolo.carlini at oracle dot |
   |com |
 Ever Confirmed|0   |1

--- Comment #4 from Paolo Carlini  2012-01-31 
21:37:08 UTC ---
Ah, thanks a lot Daniel (and Jens). Let's confirm this.


[Bug c++/51786] [c++0x] Invalid declaration with decltype accepted

2012-01-31 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51786

--- Comment #3 from Daniel Krügler  
2012-01-31 21:26:41 UTC ---
It seems to me that all these examples should be rejected (Thanks to Jens
Maurer for helping me here): At first it seems, that we can follow the grammar
chain starting from /declaration/ in 7 [dcl.dcl] via 

simple-declaration => decl-specifier-seq_opt init-declarator-list_opt; 

without the optional init-declarator-list reaching 

decl-specifier => type-specifier => trailing-type-specifier =>
simple-type-specifier => decltype(expression). 

But the show-stopper for this is 7 [dcl.dcl] p3:

"In a simple-declaration, the optional init-declarator-list can be omitted only
when declaring a class (Clause 9) or enumeration (7.2), that is, when the
decl-specifier-seq contains either a class-specifier, an elaborated-type-
specifier with a class-key (9.1), or an enum-specifier. [..]"

Neither of these three situations applies, so this is no valid
/simple-declaration/.


[Bug c++/51786] [c++0x] Invalid declaration with decltype accepted

2012-01-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51786

Paolo Carlini  changed:

   What|Removed |Added

 CC||daniel.kruegler at
   ||googlemail dot com,
   ||paolo.carlini at oracle dot
   ||com

--- Comment #2 from Paolo Carlini  2012-01-31 
15:56:47 UTC ---
Hi Daniel, are you willing to help triaging this?


[Bug c++/51786] [c++0x] Invalid declaration with decltype accepted

2012-01-16 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51786

--- Comment #1 from Paolo Carlini  2012-01-16 
18:10:46 UTC ---
I'm still not sure an error message should be triggered in the first place.