Make sure FUNDECL is non-nil before we try to use it.

From-SVN: r13689
This commit is contained in:
Stan Cox 1997-03-04 21:43:13 +00:00
parent b0298aa63f
commit 3345ee7db2
6 changed files with 6 additions and 6 deletions

View File

@ -579,7 +579,7 @@ i386_return_pops_args (fundecl, funtype, size)
tree funtype;
int size;
{
int rtd = TARGET_RTD && TREE_CODE (fundecl) != IDENTIFIER_NODE;
int rtd = TARGET_RTD && (!fundecl || TREE_CODE (fundecl) != IDENTIFIER_NODE);
/* Cdecl functions override -mrtd, and never pop the stack */
if (!lookup_attribute ("cdecl", TYPE_ATTRIBUTES (funtype))) {

View File

@ -37,7 +37,7 @@
#undef RETURN_POPS_ARGS
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
(TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
: (TARGET_RTD \
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \

View File

@ -216,7 +216,7 @@ Boston, MA 02111-1307, USA. */
#undef RETURN_POPS_ARGS
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
(TREE_CODE (FUNDECL) == IDENTIFIER_NODE \
((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE \
? 0 \
: (TARGET_RTD \
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \

View File

@ -104,7 +104,7 @@ Boston, MA 02111-1307, USA. */
#undef RETURN_POPS_ARGS
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
(TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
: (TARGET_RTD \
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \

View File

@ -668,7 +668,7 @@ dtors_section () \
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
((TARGET_ELF) ? \
(i386_return_pops_args (FUNDECL, FUNTYPE, SIZE)) : \
(TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
(((FUNDECL) && (TREE_CODE (FUNDECL) == IDENTIFIER_NODE)) ? 0 \
: (TARGET_RTD \
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \

View File

@ -75,7 +75,7 @@ Boston, MA 02111-1307, USA. */
#undef RETURN_POPS_ARGS
#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
(TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
((FUNDECL) && TREE_CODE (FUNDECL) == IDENTIFIER_NODE ? 0 \
: (TARGET_RTD \
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \