Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / diagnostic-range-bad-called-object.c
blob0f7fd2a28569584fa60796c254a506450b2bedb8
1 /* { dg-options "-fdiagnostics-show-caret" } */
3 /* Adapted from https://gcc.gnu.org/wiki/ClangDiagnosticsComparison */
5 void call_of_non_function_ptr (char **argP, char **argQ)
7 (argP - argQ)(); /* { dg-error "called object is not a function or function pointer" } */
9 /* { dg-begin-multiline-output "" }
10 (argP - argQ)();
11 ~~~~~~^~~~~~~
12 { dg-end-multiline-output "" } */
14 argP(); /* { dg-error "called object 'argP' is not a function or function pointer" } */
16 /* { dg-begin-multiline-output "" }
17 argP();
18 ^~~~
19 { dg-end-multiline-output "" }
20 { dg-begin-multiline-output "" }
21 void call_of_non_function_ptr (char **argP, char **argQ)
22 ~~~~~~~^~~~
23 { dg-end-multiline-output "" } */