RFA: fix valgrind failures 3/3

Joern RENNECKE joern.rennecke@st.com
Wed Jan 26 13:01:00 GMT 2005


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.
   



More information about the Gcc-patches mailing list