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

Bug in 3.0.4 (prerelease) in decl.c:start_method()


I noticed this new warning, since 3.0.3, in the 3.0.4 prerelease:

 > cp/decl.c:14147: warning: passing arg 1 of `cplus_decl_attributes'
 > 	from incompatible pointer type

I think it may indicate a latent bug because in fact on the 3.0 branch
cplus_decl_attributes is expecting a tree and gets passed a tree*.

I suspect the reason for this is that the patch which introduced this
was imported from the trunk where cplus_decl_attributes does in fact
expect a tree*.

I haven't had time to test this fix, other than to make sure it makes
the warning go away.  But I wanted you to be aware of this since 3.0.4
is due.  I'll do a full regtest in the mean time and let you know how
it goes.

Ok to install assuming no regressions?

		--Kaveh

PS: I wonder why the code in PR907 (which was the genesis for this)
doesn't generate a tree checking failure somewhere.  Someone who
understands this bit better should examine the resulting code to make
sure the issues in PR907 are being addressed and/or create a suitable
testcase.


2002-02-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* decl.c (start_method): Fix error in last change.

--- egcc-3.0-CVS20020216/gcc/cp/decl.c~	Wed Feb 13 16:38:31 2002
+++ egcc-3.0-CVS20020216/gcc/cp/decl.c	Sun Feb 17 11:28:48 2002
@@ -14144,7 +14144,7 @@ start_method (declspecs, declarator, att
     return NULL_TREE;
 
   if (attrlist)
-    cplus_decl_attributes (&fndecl, attrlist, 0);
+    cplus_decl_attributes (fndecl, attrlist, 0);
 
   /* Pass friends other than inline friend functions back.  */
   if (fndecl == void_type_node)


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