This is the mail archive of the gcc-patches@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]

Re: RFA: fix valgrind failures 3/3


Zack Weinberg wrote:

Joern RENNECKE <joern.rennecke@st.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 cp_parser_initializer_clause,
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.



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