| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "-Wparentheses -fdiagnostics-show-caret" } |
| 3 |
// Test fix-it hints for the MVP warning. |
| 4 |
|
| 5 |
void |
| 6 |
g () |
| 7 |
{ |
| 8 |
int (i); // { dg-warning "7:unnecessary parentheses" } |
| 9 |
/* { dg-begin-multiline-output "" } |
| 10 |
int (i); |
| 11 |
^~~ |
| 12 |
{ dg-end-multiline-output "" } */ |
| 13 |
// { dg-message "7:remove parentheses" "" { target *-*-* } 8 } |
| 14 |
/* { dg-begin-multiline-output "" } |
| 15 |
int (i); |
| 16 |
^~~ |
| 17 |
- - |
| 18 |
{ dg-end-multiline-output "" } */ |
| 19 |
int (fn(void)); // { dg-warning "7:unnecessary parentheses" } |
| 20 |
/* { dg-begin-multiline-output "" } |
| 21 |
int (fn(void)); |
| 22 |
^~~~~~~~~~ |
| 23 |
{ dg-end-multiline-output "" } */ |
| 24 |
// { dg-message "7:remove parentheses" "" { target *-*-* } 19 } |
| 25 |
/* { dg-begin-multiline-output "" } |
| 26 |
int (fn(void)); |
| 27 |
^~~~~~~~~~ |
| 28 |
- - |
| 29 |
{ dg-end-multiline-output "" } */ |
| 30 |
} |