aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c_lex.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-03-18 19:24:27 +0100
committerlemon <lsof@mailbox.org>2026-03-18 19:24:27 +0100
commita7bc7f0b0fb7363d2cb194c8708c10d7ca3ef548 (patch)
tree512e94642031711e908f773e3e31771a7341c7d3 /src/c_lex.c
parent57a7e7612cea20b53f8c23ec461bc8750951b70e (diff)
cpp: do not warn for "#define X(){}" with no space after the )
Diffstat (limited to 'src/c_lex.c')
-rw-r--r--src/c_lex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/c_lex.c b/src/c_lex.c
index 826b9a4..8e225b6 100644
--- a/src/c_lex.c
+++ b/src/c_lex.c
@@ -916,7 +916,7 @@ ppdefine(Lexer *lx)
/* gather replacement list */
mac.rl.off = mtoksbuf.n;
for (int n = 0; lex0(lx, &tk, 0) != '\n' && tk.t != TKEOF;) {
- if (n == 0 && !tk.space)
+ if (n == 0 && !tk.space && !mac.fnlike)
warn(&tk.span, "no whitespace after macro name");
Token *prev = n ? &mtoksbuf.p[mtoksbuf.n-1] : NULL;
if (mac.fnlike && tk.t == TKIDENT) {