This is the mail archive of the
mailing list for the GCC project.
Re: RFA: fix valgrind failures 3/3
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 26 Jan 2005 13:00:48 +0000
- Subject: Re: RFA: fix valgrind failures 3/3
- References: <41F6A121.email@example.com> <firstname.lastname@example.org>
Zack Weinberg wrote:
Joern RENNECKE <email@example.com> writes:
The third problem that was found with valgrind on 3.4.3 was when parsing a
numeric literal. The numeric literal case has been rewritten the current
mainline, which should have taken care of this particular problem, but
it appears we still need an initialization to cover the case of
an initializer that consists of an empty pair of curly braces.
* parse.c (cp_parser_initializer_clause): Initialize *non_constant_p.
I think this should go in cp_parser_initializer_list instead of
cp_parser_initializer_clause. It seems to be the convention that the
callers of cp_parser_initializer_clause are responsible for default-
clearing this flag.
P.S.: If you want to make this change in the required semantics of
it would be consistent to make it never clear *non_constant_p when it
was already set. Of course,
that's a much larger change to implement.