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: unassig...@gcc.gnu.org

        ReportedBy: fpellicci...@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

Reply via email to