This is the mail archive of the 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]
Other format: [Raw text]

Re: [C++ PATCH]: Fix 9043

On Tue, 2003-12-16 at 07:02, Nathan Sidwell wrote:
> Mark,
> this fixes 9043, another mangling bug. The real bug is in handling of
> array dimensions during template parsing, and this patch improves the
> handling there. It preserves the old behavour for -fabi-version=1.
> The special handling of a SCOPE_REF looked wrong to me, I'd guess a
> holdover from not processing value dependent expressions properly.
> In addition to the regular testing, I ran the testsuite with the
> abi check in compute_array_index_type hardwired to true and then
> to false, with no regressions. Likewise I ran the testsuite with
> a new cc1plus but an libstdc++ compiled with an old cc1plus.

I had to stare at this pretty hard, but it makes sense now.  This patch
is OK.

If the SCOPE_REF thing has any impact, it will be on code like this:

template <typename T>
struct S {
  static const int i;
  static T t[i];

template <typename T>
T S<T>::t[S<T>::i];

This kind of thing is notoriously nasty because you have to match up "i"
with "S<T>::i".

I think that I fixed this once and for all when I got coded up the
dependent lookup logic properly.  So, I think that removing the code
that you did is safe and correct.

There are things like the code above in STL, so if you made it through
the V3 testsuite that certainly means that removing the code is not
incredibly broken.


Mark Mitchell <>
CodeSourcery, LLC

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