1 // { dg-do compile }
2 // { dg-options "-Wconversion -ftrack-macro-expansion=2" }
3 // { dg-require-effective-target int32plus }
4
5 #include "conversion-real-integer-3.h"
6
7 float vfloat;
8
h(void)9 void h (void)
10 {
11 // We want to trigger an error on the token INT_MAX below, that is
12 // a macro that expands to the built-in __INT_MAX__. Furthermore,
13 // INT_MAX is defined inside a system header.
14 //
15 // The behavior we want is that the diagnostic should point to
16 // the locus that inside the source code here, at the relevant
17 // line below, even with -ftrack-macro-expansion. We don't want
18 // it to point to the any locus that is inside the system header.
19 vfloat = INT_MAX; // { dg-warning "conversion from .int. to .float. changes value from .2147483647. to " }
20 }
21