]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/Warray-parameter-5.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / Warray-parameter-5.c
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" } */
8
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]'" }
12
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 \\\(\\\*\\\)\\\[]'" }