bug 2914 & scope
Gabriel Dos Reis
gdr@codesourcery.com
Mon May 28 04:08:00 GMT 2001
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
More information about the Gcc
mailing list