aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-07-15 17:56:20 +0200
committerMichael Matz <matz@suse.de>2016-12-15 17:47:09 +0100
commit5d0c16a884a6639ba3d2de43808104839afe6dcd (patch)
treebf8ab548bb5d079bd613db8fb474ceead4f7cd72 /tccgen.c
parent662338f116c3b87c78ddb113e8e63f6329fe307f (diff)
downloadtinycc-5d0c16a884a6639ba3d2de43808104839afe6dcd.tar.gz
tinycc-5d0c16a884a6639ba3d2de43808104839afe6dcd.tar.bz2
Support attribute between double pointer stars
"int * __attribute__((something)) *" is supported by GCC.
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tccgen.c b/tccgen.c
index f49caa6..3786b49 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3859,15 +3859,16 @@ static void type_decl(CType *type, AttributeDef *ad, int *v, int td)
case TOK_RESTRICT2:
case TOK_RESTRICT3:
goto redo;
+ /* XXX: clarify attribute handling */
+ case TOK_ATTRIBUTE1:
+ case TOK_ATTRIBUTE2:
+ parse_attribute(ad);
+ break;
}
mk_pointer(type);
type->t |= qualifiers;
}
- /* XXX: clarify attribute handling */
- if (tok == TOK_ATTRIBUTE1 || tok == TOK_ATTRIBUTE2)
- parse_attribute(ad);
-
/* recursive type */
/* XXX: incorrect if abstract type for functions (e.g. 'int ()') */
type1.t = 0; /* XXX: same as int */