This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bug 2914 & scope
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Subject: Re: bug 2914 & scope
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 28 May 2001 13:08:03 +0200
- Cc: gcc at gcc dot gnu dot org, jason at redhat dot com, gdr at codesourcery dot com
- Organization: CodeSourcery, LLC
- References: <3B111AB9.35150059@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com> writes:
| [1 <text/plain; us-ascii (7bit)>]
| Hi,
| I attach a stripped down 2914 test case, which ICE's at the definition
| of DoubleSupport::toDouble. The reason for this is the definition of
| DoubleSupport::s_positiveInfinity. You'll see that defines a union named
| tag (in the test case that was anonymous). That definition is placed into
| the scope of DoubleSupport and appended to its TYPE_FIELDs chain. However,
| it is not put into the sorted table of fields (DoubleSupport has more
| than seven members, so it gets sorted).
|
| My question is, should that union be put into DoubleSupport's scope at all?
| DoubleSupport is complete at that point, so why are new types being put into
| it?
I think in this case, we should put `union tag' in the enclosing
namespace scope. There is no point in adding to DoubleSupport whereas
it's complete at that point.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com