diff options
| author | 2025-11-22 11:01:46 +0100 | |
|---|---|---|
| committer | 2025-11-22 12:26:29 +0100 | |
| commit | 4444c247ea8b906f511864bcfb3ce62ed9653ba3 (patch) | |
| tree | 5da1018b83f384927b0f02f486cfe4d34c13730e /c/lex.c | |
| parent | c2f9d128ecd15c9f285426b4e7b9bc2cd3d53732 (diff) | |
c: move warning for extension keyword til after preprocessor
Diffstat (limited to 'c/lex.c')
| -rw-r--r-- | c/lex.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -33,6 +33,7 @@ identkeyword(struct token *tk, const char *s, int len) }; int l = 0, h = arraylength(kwtab) - 1, i, cmp; + tk->extwarn = 0; if (len > TKWMAXLEN_) goto ident; /* binary search over sorted array */ while (l <= h) { @@ -579,8 +580,7 @@ Begin: } tmp[n] = 0; if (!identkeyword(tk, tmp, n) && ccopt.pedant) - warn(&(struct span) {{ idx, lx->chridx - idx, lx->fileid }}, - "%'tk in %M is an extension", tk); + tk->extwarn = 1; goto End; } case 0: if (lx->idx >= lx->ndat) RET(TKEOF); |