Skip to contentSkip to conversation

Apostrophes confuse preprocessor

DISCUSSION Pavel Roskin 1 participant 1 message Jul 12, 2007 Sparse checker

lore
Share & tools
lore
#0 lore raw

Hello!

Sparse reports errors for apostrophes in preprocessor directives. To make things worse, it suppresses all useful warnings in the file.

$ cat test.c
#error Don't do it
$ sparse test.c 
test.c:1:13: error: Bad character constant
test.c:1:2: error: Don do it
$ gcc test.c
test.c:1:2: error: #error Don't do it
$
Signature · 2 lines
Regards,
Pavel Roskin