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

[Bug c++/28886] [4.1/4.2 regression] Template specialization with array rejected



------- 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.

The other way of fixing this is not to call fold if
we have a MINUS_EXPR with the 2nd operand as 1, we
just use the first.  Really I don't see any reason
why we should introduce a language hook when we
can just strip the NON_LVALUE_EXPR right after
fold and introducing a language hook which will
only help in one specific case.

The real real way of fixing this is to move the C++
front-end's templates from using trees and use something
which is just specific to the C++ front-end and we would
not have to call fold here at all since we will just store
the length of the array instead of the "length-1".

-- Pinski


-- 


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


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