This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH] [PR19208] Completely fold array domains
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Giovanni Bajo <giovannibajo at libero dot it>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Jan 2005 18:08:03 -0800
- Subject: Re: [C++ PATCH] [PR19208] Completely fold array domains
- Organization: CodeSourcery, LLC
- References: <0a9e01c4fedc$0467fac0$3fb82997@bagio>
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?