This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bug 2914 & scope


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]