C++ PATCH to cp/decl.c: Timing name lookup

Andrew Pinski pinskia@physics.uc.edu
Thu Feb 13 07:49:00 GMT 2003


Your patch broke the bootstrap on an i696-pc-linux-gnu because it 
produces a warning during the second stage:
/home/gates/pinskia/src/gnu/gcc/src/gcc/cp/decl.c: In function 
`define_label':
/home/gates/pinskia/src/gnu/gcc/src/gcc/cp/decl.c:5006: warning: return 
makes pointer from integer without a cast

The problem is you `return ( timevar_pop (TV_NAME_LOOKUP), 0)' which is 
wrong if the return type is a pointer.

Here is patch which should fix it:
(note this was copied from a terminal which means the tabs might be 
been turned into spaces).
ChangeLog:
2003-02-14	Andrew Pinski <pinskia@physics.uc.edu>

	* decl.c: (define_label): Fix warning for return 0 instead of NULL.

Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.995
diff -u -d -b -w -u -r1.995 decl.c
--- decl.c      13 Feb 2003 04:57:20 -0000      1.995
+++ decl.c      13 Feb 2003 07:12:27 -0000
@@ -5003,7 +5003,7 @@
    if (DECL_INITIAL (decl) != NULL_TREE)
      {
        error ("duplicate label `%D'", decl);
-      POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, 0);
+      POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, NULL);
      }
    else
      {



More information about the Gcc-patches mailing list