diff options
Diffstat (limited to 'validation/cond-address-function.c')
| -rw-r--r-- | validation/cond-address-function.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/validation/cond-address-function.c b/validation/cond-address-function.c new file mode 100644 index 00000000..9a143a00 --- /dev/null +++ b/validation/cond-address-function.c @@ -0,0 +1,18 @@ +extern void func(void); + +int global_function(void) +{ + if (func) + return 1; + return 0; +} + +/* + * check-name: cond-address-function + * check-command: test-linearize -Wno-decl -Waddress $file + * check-output-ignore + * + * check-error-start +cond-address-function.c:5:13: warning: the address of a function will always evaluate as true + * check-error-end + */ |
