This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Anonymous structs with duplicate members within unions
- From: Mark Mitchell <mark at codesourcery dot com>
- To: "Steven L. Zook" <SLZook at Qualstar dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 18 Jan 2005 16:32:44 -0800
- Subject: Re: Anonymous structs with duplicate members within unions
- Organization: CodeSourcery, LLC
- References: <9E27B4AB55478346B9F7848926E49B7F9263BE@exchange1.qualstar.com>
Steven L. Zook wrote:
"As such, they are ambiguous."
That seems a little harsh :-(
No; uDerf::A is ambiguous. Which one is it? You seem to be seeing that
you want the A in the two anonymous structs to be merged together.
There's no precedent for that in any compiler I've ever seen. If
they're not merged together, then they're ambiguous, in the sense that
the C++ standard uses that term.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304