aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'decl.c')
-rw-r--r--decl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/decl.c b/decl.c
index 870d72a..7bd2cbb 100644
--- a/decl.c
+++ b/decl.c
@@ -325,6 +325,15 @@ declspecs(struct scope *s, enum storageclass *sc, enum funcspecifier *fs, int *a
++ntypes;
next();
break;
+ case T__TYPEOF__:
+ next();
+ expect(TLPAREN, "after '__typeof__'");
+ t = typename(s);
+ if (!t)
+ t = expr(s)->type;
+ ++ntypes;
+ expect(TRPAREN, "to close '__typeof__'");
+ break;
/* 6.7.5 Alignment specifier */
case T_ALIGNAS: