libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / Warray-parameter-5.c
blob6e89bf0c801a3fc078003a14cc53d0236e2df0e0
1 /* PR c/50584 - No warning for passing small array to C99 static array
2 declarator
3 Verify that -Warray-parameter diagnoses mismatches in bounds of
4 arrays between redeclarations of the same function and with pointer
5 parameters pointing to those arrays.
6 { dg-do compile }
7 { dg-options "-Wall -Warray-parameter" } */
9 void fa_x (int (*)[]); // { dg-message "previously declared as 'int \\\(\\\*\\\)\\\[]'" }
10 void fa_x (int (*)[2]); // { dg-warning "\\\[-Warray-parameter" }
11 void fa_x (int (*)[2]); // { dg-warning "mismatch in bound 1 of argument 1 declared as 'int \\\(\\\*\\\)\\\[2]'" }
13 void fa_2 (int (*)[2]); // { dg-message "previously declared as 'int \\\(\\\*\\\)\\\[2]'" }
14 void fa_2 (int (*)[]); // { dg-warning "mismatch in bound 1 of argument 1 declared as 'int \\\(\\\*\\\)\\\[]'" }