1 /* Verify that predefined macros for properties of the compiler and
2 library together are the same before and after system headers are
3 included. This is broken with older glibc versions. */
4 /* { dg-do compile } */
5 /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
7 #ifdef __STDC_IEC_559__
8 #define IEC_559_DEFINED_BEFORE 1
10 #define IEC_559_DEFINED_BEFORE 0
13 #ifdef __STDC_IEC_559_COMPLEX__
14 #define IEC_559_COMPLEX_DEFINED_BEFORE 1
16 #define IEC_559_COMPLEX_DEFINED_BEFORE 0
19 #ifdef __STDC_ISO_10646__
20 #define ISO_10646_DEFINED_BEFORE 1
22 #define ISO_10646_DEFINED_BEFORE 0
27 #ifdef __STDC_IEC_559__
28 #define IEC_559_DEFINED_AFTER 1
30 #define IEC_559_DEFINED_AFTER 0
33 #ifdef __STDC_IEC_559_COMPLEX__
34 #define IEC_559_COMPLEX_DEFINED_AFTER 1
36 #define IEC_559_COMPLEX_DEFINED_AFTER 0
39 #ifdef __STDC_ISO_10646__
40 #define ISO_10646_DEFINED_AFTER 1
42 #define ISO_10646_DEFINED_AFTER 0
45 #if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 16))
51 #if IEC_559_DEFINED_BEFORE != IEC_559_DEFINED_AFTER
52 #error "__STDC_IEC_559__ definition inconsistency"
55 #if IEC_559_COMPLEX_DEFINED_BEFORE != IEC_559_COMPLEX_DEFINED_AFTER
56 #error "__STDC_IEC_559_COMPLEX__ definition inconsistency"
59 #if ISO_10646_DEFINED_BEFORE != ISO_10646_DEFINED_AFTER
60 #error "__STDC_ISO_10646__ definition inconsistency"