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] [PR19208] Completely fold array domains

Giovanni Bajo wrote:

PR 19208 is about an array domain containing dependent expressions which was
not completely folded during template instantiation. The bug is basically a
relic of using old incomplete functions to fold things in templates: we now
have our cute sledgehammer for this kind of things (fold_decl_constant_value),
so using it instead of integer_constant_value is enough to fix this bug. More
to the detail, it was the presence of a scope_ref to confuse the code: I think
this appeared with Kriang's changes (somewhere in 2003) to always keep
synctatic form in templates for the purpose of access checking.

Notice also that I rearranged the loop in fold_decl_constant_value to make sure
that we call fold_non_dependent_expr at least one, thus making the function
more generically useful.

Tested on i686-pc-linux-gnu with no new regressions. OK for mainline and 3.4?


Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

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