Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / c-c++-common / missing-close-func-paren.c
blob3177e250e1c314f8e4dfe79341db104bab32270e
1 /* { dg-options "-fdiagnostics-show-caret" } */
3 /* Verify that the C/C++ frontends show the pertinent opening symbol when
4 a closing symbol is missing for a function call. */
6 /* Verify that, when they are on the same line, that the opening symbol is
7 shown as a secondary range within the main diagnostic. */
9 extern int __attribute__((const)) foo (int a, int b, int c);
11 void single_func ()
13 int single =
14 foo (1, (1 + 2), (1 + 2 + 3):); /* { dg-error "expected '\\)' before ':' token" } */
15 /* { dg-begin-multiline-output "" }
16 foo (1, (1 + 2), (1 + 2 + 3):);
17 ~ ^
19 { dg-end-multiline-output "" } */
22 /* Verify that, when they are on different lines, that the opening symbol is
23 shown via a secondary diagnostic. */
25 void multi_func ()
27 int multi =
28 foo (1, /* { dg-message "to match this '\\('" } */
29 (1 + 2),
30 (1 + 2 + 3):); /* { dg-error "expected '\\)' before ':' token" } */
31 /* { dg-begin-multiline-output "" }
32 (1 + 2 + 3):);
35 { dg-end-multiline-output "" } */
36 /* { dg-begin-multiline-output "" }
37 foo (1,
39 { dg-end-multiline-output "" } */