comparison gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-5.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* PR testsuite/88098 - FAIL: gcc.dg/Wbuiltin-declaration-mismatch-4.c
2 { dg-do compile }
3 { dg-options "-Wbuiltin-declaration-mismatch -fshort-enums" } */
4
5 int abs ();
6 double fabs (); /* { dg-message "built-in .fabs. declared here" } */
7
8 enum E { e0 } e;
9
10 int i;
11 double d;
12
13 void test_short_enums (void)
14 {
15 /* enum e promotes to int. */
16 i = abs (e);
17
18 d = fabs (e); /* { dg-warning ".fabs. argument 1 promotes to .int. where .double. is expected in a call to built-in function declared without prototype" } */
19 }