Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wconversion-real-integer-3.C
blob8b7574dbbc8c8a9e538c7a1713af074f7d67dd47
1 // { dg-do compile }
2 // { dg-options "-Wconversion -ftrack-macro-expansion=2" }
3 // { dg-require-effective-target int32plus }
5 #include "conversion-real-integer-3.h"
7 float  vfloat;
9 void h (void)
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 " }