[Bug c++/56585] New: Cannot introduce a qualified type - Elaborated type specifiers

fpelliccioni at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Mar 9 23:47:00 GMT 2013


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

             Bug #: 56585
           Summary: Cannot introduce a qualified type - Elaborated type
                    specifiers
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: fpelliccioni@gmail.com


I understand that the following code should yield a compiler error. 
According to the C++ Standard ( N3485 )
    3.4.4 Elaborated type specifiers [basic.lookup.elab]
    See example in paragraph 3

Instead, the compiler issues a warning.

// Begin code-----------------
struct Data {};
struct ::Data;
int main () {}

// End code-------------------

Verified on:
    4.8.0 (20130204)
    4.7.2
    4.6.3

Used as follows:    
    -std=c++11 -Wall -W -pedantic -O2
    or
    -std=c++0x -Wall -W -pedantic -O2


Thanks and Regards,
Fernando Pelliccioni



More information about the Gcc-bugs mailing list