merge with trunk @ 139506
[official-gcc.git] / gcc / testsuite / gcc.dg / inline-14.c
blob15b2d404c1157d0685b6e3ea02649603ebc9efa7
1 /* Check that you can't redefine a C99 inline function. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c99" } */
5 extern inline int func1 (void)
6 { /* { dg-message "note: previous definition" } */
7 return 1;
10 inline int func1 (void) /* { dg-error "redefinition" } */
12 return 1;
15 inline int func2 (void)
16 { /* { dg-message "note: previous definition" } */
17 return 2;
20 inline int func2 (void) /* { dg-error "redefinition" } */
22 return 2;