public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28107]  New: Incomplete type in struct added to global namespace
@ 2006-06-20 19:39 reichelt at gcc dot gnu dot org
  2006-06-20 19:40 ` [Bug c++/28107] " pinskia at gcc dot gnu dot org
  2007-08-17 15:37 ` pcarlini at suse dot de
  0 siblings, 2 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-06-20 19:39 UTC (permalink / raw)
  To: gcc-bugs

For the following invalid code snippet

==================
struct A
{
    union B b;
};

struct B;
==================

the C++ frontend generates the following error message:

bug.cc:3: error: field 'b' has incomplete type
bug.cc:6: error: 'struct' tag used in naming 'union B'

While the first line is OK, the second one is not.
Apparently, union B is added to the global namespace.
IMHO it should be placed into A.


-- 
           Summary: Incomplete type in struct added to global namespace
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: diagnostic, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-05 17:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-28107-4@http.gcc.gnu.org/bugzilla/>
2013-05-13 14:21 ` [Bug c++/28107] Incomplete type in struct added to global namespace paolo.carlini at oracle dot com
2013-09-05 17:24 ` paolo.carlini at oracle dot com
2013-09-05 17:44 ` redi at gcc dot gnu.org
2006-06-20 19:39 [Bug c++/28107] New: " reichelt at gcc dot gnu dot org
2006-06-20 19:40 ` [Bug c++/28107] " pinskia at gcc dot gnu dot org
2007-08-17 15:37 ` pcarlini at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).