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]

RFA: fix valgrind failures 3/3



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.

2005-01-21  J"orn Rennecke <joern.rennecke@st.com>

	* parse.c (cp_parser_initializer_clause): Initialize *non_constant_p.

Index: cp/parser.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/parser.c,v
retrieving revision 1.302
diff -p -r1.302 parser.c
*** cp/parser.c	6 Jan 2005 20:21:13 -0000	1.302
--- cp/parser.c	25 Jan 2005 19:05:05 -0000
*************** cp_parser_initializer_clause (cp_parser*
*** 12001,12006 ****
--- 12001,12009 ----
  {
    tree initializer;
  
+   /* Assume the expression is constant.  */
+   *non_constant_p = false;
+ 
    /* If it is not a `{', then we are looking at an
       assignment-expression.  */
    if (cp_lexer_next_token_is_not (parser->lexer, CPP_OPEN_BRACE))

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