repo.or.cz
/
smatch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
states: rename unreachable() to is_unreachable()
[smatch.git]
/
validation
/
preprocessor
/
directive-within-macro.c
blob
4562078a5f2378af7098e4946bc30d44a2c905f4
1
#define f(x) x
2
3
f
(
1
4
#if 1
// OK
5
a
6
#elif 2
// OK
7
b
8
#else
// OK
9
c
10
#endif
// OK
11
#ifdef f
// OK
12
d
13
#endif
// OK
14
#ifndef f
// OK
15
e
16
#endif
// OK
17
3
)
18
19
f
(
1
20
#define x y
// KO
21
3
)
22
23
/*
24
* check-name: directive-within-macro
25
* check-command: sparse -E $file
26
*
27
* check-output-start
28
29
1 a d 3
30
1 3
31
* check-output-end
32
*
33
* check-error-start
34
preprocessor/directive-within-macro.c:20:1: warning: directive in macro's argument list
35
* check-error-end
36
*/