aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2001-09-11 13:52:04 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2001-09-11 13:52:04 +0100
commit1d30139d37ad8281957c875475c6a496b37ab015 (patch)
tree354be61dc8d5de0aee47b0c3f2080226630fc950 /gcc/c-common.c
parent7ded4467c9ee286111320967832db758d71acf4c (diff)
downloadgcc-1d30139d37ad8281957c875475c6a496b37ab015.zip
gcc-1d30139d37ad8281957c875475c6a496b37ab015.tar.gz
gcc-1d30139d37ad8281957c875475c6a496b37ab015.tar.bz2
re PR c/4294 (ICE for bad empty attribute)
* c-common.c (split_specs_attrs): Allow for empty attributes with empty TREE_PURPOSE. Fixes PR c/4294. testsuite: * gcc.c-torture/compile/20010911-1.c: New test. From-SVN: r45541
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 72b1417..91f4b0a 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1204,7 +1204,9 @@ split_specs_attrs (specs_attrs, declspecs, prefix_attributes)
s = t;
}
}
- else
+ /* The TREE_PURPOSE may also be empty in the case of
+ __attribute__(()). */
+ else if (TREE_PURPOSE (t) != NULL_TREE)
{
if (attrs == NULL_TREE)
attrs = a = TREE_PURPOSE (t);