aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStan Cox <coxs@gnu.org>1997-03-04 21:43:13 +0000
committerStan Cox <coxs@gnu.org>1997-03-04 21:43:13 +0000
commit3345ee7db290b748a5ca92782a863088c735c1fb (patch)
treec21a01776de7e9b5c640de1586496861a9483c4e /gcc
parentb0298aa63fba9509633f8fad881b7981408d76db (diff)
downloadgcc-3345ee7db290b748a5ca92782a863088c735c1fb.zip
gcc-3345ee7db290b748a5ca92782a863088c735c1fb.tar.gz
gcc-3345ee7db290b748a5ca92782a863088c735c1fb.tar.bz2
Make sure FUNDECL is non-nil before we try to use it.
From-SVN: r13689
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/config/i386/isc.h2
-rw-r--r--gcc/config/i386/next.h2
-rw-r--r--gcc/config/i386/sco.h2
-rw-r--r--gcc/config/i386/sco5.h2
-rw-r--r--gcc/config/i386/scodbx.h2
6 files changed, 6 insertions, 6 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 85b422f..ff48a3d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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))) {
diff --git a/gcc/config/i386/isc.h b/gcc/config/i386/isc.h
index 24569e1..c0a5150 100644
--- a/gcc/config/i386/isc.h
+++ b/gcc/config/i386/isc.h
@@ -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))) \
diff --git a/gcc/config/i386/next.h b/gcc/config/i386/next.h
index 62c8dd6..8dd46f5 100644
--- a/gcc/config/i386/next.h
+++ b/gcc/config/i386/next.h
@@ -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 \
diff --git a/gcc/config/i386/sco.h b/gcc/config/i386/sco.h
index 8676889..9c94a76 100644
--- a/gcc/config/i386/sco.h
+++ b/gcc/config/i386/sco.h
@@ -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))) \
diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h
index d6fc7d4..d156cab 100644
--- a/gcc/config/i386/sco5.h
+++ b/gcc/config/i386/sco5.h
@@ -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))) \
diff --git a/gcc/config/i386/scodbx.h b/gcc/config/i386/scodbx.h
index 3a7a198..a2581d4 100644
--- a/gcc/config/i386/scodbx.h
+++ b/gcc/config/i386/scodbx.h
@@ -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))) \