This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18101] invalid declaration in struct not rejected
- From: "sambitdash at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2006 06:22:41 -0000
- Subject: [Bug c++/18101] invalid declaration in struct not rejected
- References: <bug-18101-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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