aboutsummaryrefslogtreecommitdiffhomepage
path: root/c/c.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/c.c')
-rw-r--r--c/c.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/c/c.c b/c/c.c
index 1eaba44..a93dcc6 100644
--- a/c/c.c
+++ b/c/c.c
@@ -141,6 +141,7 @@ isdecltok(struct comp *cm)
kw(int), kw(char), kw(_Bool), kw(bool),
kw(struct), kw(union), kw(enum),
kw(__typeof__), kw(typeof), kw(typeof_unqual),
+ kw(__attribute__)
#undef kw
};
return ((uint)tk.t-TKWBEGIN_) < countof(kws) && kws[tk.t-TKWBEGIN_];
@@ -2338,7 +2339,7 @@ End:
goto Bad;
st->base = mktype(t ? t : TYINT);
} else if (!st->base.t) {
- if (ccopt.cstd < STDC23) {
+ if (ccopt.cstd < STDC23 && peek(cm, NULL) == TKIDENT) {
if (ccopt.cstd > STDC89)
warn(&tk.span, "type implicitly declared as int");
st->base = mktype(TYINT);