------- Comment #8 from mark at codesourcery dot com  2006-09-02 03:50 -------
Subject: Re:  [4.1/4.2 regression] Template specialization
 with array rejected

pinskia at physics dot uc dot edu wrote:
> ------- Comment #7 from pinskia at physics dot uc dot edu  2006-09-02 01:39 
> -------
> Subject: Re:  [4.1/4.2 regression] Template specialization
>         with array rejected
> 
> On Fri, 2006-09-01 at 22:30 +0000, mark at codesourcery dot com wrote:
>> So, that's what should be fixed.

> Except that means introducing a language hook which
> is only to be useful in one place.

That's not necessarily a bad thing.  But, introducing NON_LVALUE_EXPRs 
that we are just going to throw away is a bad thing.

And, yes, if we can avoid generating MINUS_EXPRs, that would be even 
better.  In general, it might be better if range types were expressed as 
half-open intervals, rather than closed intervals, since then the number 
of elements in the array would be immediately available, and that's 
something often wants.

> The real real way of fixing this is to move the C++
> front-end's templates from using trees

You bring this up every so often, but I am totally unpersuaded.  Using 
trees is just fine for C++.  The advantages to not using trees would be 
interfacing to things other than GCC itself; there are no advantages 
within the compiler.  For example, if we didn't have trees for C++, we'd 
be totally unable to use fold.  In any case, this is entirely orthogonal 
to the issue at hand.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28886

Reply via email to