public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12620] New: compatibility issue with anonymous struct/union support
@ 2003-10-15 12:03 jbeulich at novell dot com
  2003-10-15 12:23 ` [Bug c++/12620] " jbeulich at novell dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jbeulich at novell dot com @ 2003-10-15 12:03 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: compatibility issue with anonymous struct/union support
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jbeulich at novell dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

In

class ccc {
public:
	union {
		int i;
	};
};

all other compilers I can check with (Intel, Microsoft, Borland, MetroWerks)
treat i as a member of ccc. Since the feature is documented to exist for
compatibility reasons, the behavior should be compatible, too.

This can easily be tested with above declaration and the code

template<typename T> void test(T p);

void test() {
	test(&ccc::i);
}

by observing what template instantiation is selected by the compiler.


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

end of thread, other threads:[~2003-11-28 21:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15 12:03 [Bug c++/12620] New: compatibility issue with anonymous struct/union support jbeulich at novell dot com
2003-10-15 12:23 ` [Bug c++/12620] " jbeulich at novell dot com
2003-10-15 12:25 ` jbeulich at novell dot com
2003-10-15 17:52 ` pinskia at gcc dot gnu dot org
2003-10-16  7:46 ` jbeulich at novell dot com
2003-11-28 21:39 ` pinskia at gcc dot gnu dot org

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).