This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH to cp/decl.c: Timing name lookup
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org, Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Wed, 12 Feb 2003 23:49:26 -0800
- Subject: Re: C++ PATCH to cp/decl.c: Timing name lookup
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
{