[Bug testsuite/21062] New: Incorrect declaration of printf() in alias2.C
oyvind dot harboe at zylin dot com
gcc-bugzilla@gcc.gnu.org
Sat Apr 16 22:04:00 GMT 2005
See attached patch.
My GCC superpowers aren't quite up to analyzing this, but I suppose this would
cause problems for e.g. the i2pk target as it would receive size=0 in its
arguments in the function below.
If this can't be sorted out by trivial inspection, please let me know and I'll
run some tests.
/* Returns the number of bytes of arguments automatically
popped when returning from a subroutine call.
FUNDECL is the declaration node of the function (as a tree),
FUNTYPE is the data type of the function (as a tree),
or for a library call it is an identifier node for the subroutine name.
SIZE is the number of bytes of arguments passed on the stack. */
int
ip2k_return_pops_args (tree fundecl ATTRIBUTE_UNUSED, tree funtype, int size)
{
if (TREE_CODE (funtype) == IDENTIFIER_NODE)
return size;
if (TYPE_ARG_TYPES (funtype) == NULL_TREE
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (funtype))) == void_type_node))
return size;
return 0;
}
--
Summary: Incorrect declaration of printf() in alias2.C
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: testsuite
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: oyvind dot harboe at zylin dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21062
More information about the Gcc-bugs
mailing list