public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/28107] Incomplete type in struct added to global namespace [not found] <bug-28107-4@http.gcc.gnu.org/bugzilla/> @ 2013-05-13 14:21 ` 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 2 siblings, 0 replies; 5+ messages in thread From: paolo.carlini at oracle dot com @ 2013-05-13 14:21 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28107 --- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> --- Likewise does current ICC and OracleStudio and rather recent clang. I guess this could use some further triage. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/28107] Incomplete type in struct added to global namespace [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 2 siblings, 0 replies; 5+ messages in thread From: paolo.carlini at oracle dot com @ 2013-09-05 17:24 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28107 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC|gcc-bugs at gcc dot gnu.org | Resolution|--- |INVALID --- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> --- Let's close this. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/28107] Incomplete type in struct added to global namespace [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 2 siblings, 0 replies; 5+ messages in thread From: redi at gcc dot gnu.org @ 2013-09-05 17:44 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28107 --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes, this is invalid, a member definition such as "union B b;" does not declare a nested type, that would be: struct A { union B; B b; }; ^ permalink raw reply [flat|nested] 5+ messages in thread
* [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
* [Bug c++/28107] Incomplete type in struct added to global namespace 2006-06-20 19:39 [Bug c++/28107] New: " reichelt at gcc dot gnu dot org @ 2006-06-20 19:40 ` pinskia at gcc dot gnu dot org 2007-08-17 15:37 ` pcarlini at suse dot de 1 sibling, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2006-06-20 19:40 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pinskia at gcc dot gnu dot org 2006-06-20 19:39 ------- Confirmed. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-06-20 19:39:46 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28107 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/28107] Incomplete type in struct added to global namespace 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 1 sibling, 0 replies; 5+ messages in thread From: pcarlini at suse dot de @ 2007-08-17 15:37 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from pcarlini at suse dot de 2007-08-17 15:37 ------- FWIW, Comeau gives very similar errors: "ComeauTest.c", line 3: error: incomplete type is not allowed union B b; ^ "ComeauTest.c", line 6: error: tag kind of class or struct is incompatible with declaration of union "B" (declared at line 3) struct B; ^ -- 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).