This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/18101] invalid declaration in struct not rejected



------- Comment #2 from sambitdash at gmail dot com  2006-06-05 06:22 -------
I am not sure if this code is invalid. 

It's no different from saying:

struct B
{
    struct A;
};

A is just a forward declaration here. 

In the following code is not invalid but the statement ::A is innocuous and for
::A to be defined struct A must have been defined in the global scope. 

==========================
struct A;

struct B
{
    struct ::A;
};
==========================

Hence, I will suggest this be marked as not a bug. 


-- 

sambitdash at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sambitdash at gmail dot com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]