annotate gcc/testsuite/gcc.dg/builtins-config.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Copyright (C) 2003, 2004, 2005, 2006, 2009, 2011, 2012
kono
parents:
diff changeset
2 Free Software Foundation.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 Define macros useful in tests for bulitin functions. */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 /* Define HAVE_C99_RUNTIME if the entire C99 runtime is available on
kono
parents:
diff changeset
7 the target system. The value of HAVE_C99_RUNTIME should be the
kono
parents:
diff changeset
8 same as the value of TARGET_C99_FUNCTIONS in the GCC machine
kono
parents:
diff changeset
9 description. (Perhaps GCC should predefine a special macro
kono
parents:
diff changeset
10 indicating whether or not TARGET_C99_FUNCTIONS is set, but it does
kono
parents:
diff changeset
11 not presently do that.) */
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 #if defined(__hppa) && defined(__hpux)
kono
parents:
diff changeset
14 /* PA HP-UX doesn't have the entire C99 runtime. */
kono
parents:
diff changeset
15 #elif defined(__INTERIX)
kono
parents:
diff changeset
16 /* Interix6 doesn't have the entire C99 runtime. */
kono
parents:
diff changeset
17 #elif defined(__AVR__)
kono
parents:
diff changeset
18 /* AVR doesn't have the entire C99 runtime. */
kono
parents:
diff changeset
19 #elif defined(__FreeBSD__) && (__FreeBSD__ < 9)
kono
parents:
diff changeset
20 /* FreeBSD up to version 8 lacks support for cexp and friends. */
kono
parents:
diff changeset
21 #elif defined(__vxworks)
kono
parents:
diff changeset
22 /* VxWorks doesn't have a full C99 time. (cabs is missing, for example.) */
kono
parents:
diff changeset
23 #elif defined(_WIN32) && !defined(__CYGWIN__)
kono
parents:
diff changeset
24 /* Windows doesn't have the entire C99 runtime. */
kono
parents:
diff changeset
25 #elif (defined(__APPLE__) && defined(__ppc__) \
kono
parents:
diff changeset
26 && ! defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__))
kono
parents:
diff changeset
27 /* MacOS versions before 10.3 don't have many C99 functions.
kono
parents:
diff changeset
28 But, if you're including this file, you probably want to test the
kono
parents:
diff changeset
29 newer behavior, so: */
kono
parents:
diff changeset
30 #error forgot to set -mmacosx-version-min.
kono
parents:
diff changeset
31 #elif (defined(__APPLE__) && defined(__ppc__) \
kono
parents:
diff changeset
32 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1030)
kono
parents:
diff changeset
33 /* MacOS versions before 10.3 don't have many C99 functions. */
kono
parents:
diff changeset
34 #else
kono
parents:
diff changeset
35 /* Newlib has the "f" variants of the math functions, but not the "l"
kono
parents:
diff changeset
36 variants. TARGET_C99_FUNCTIONS is only defined if all C99
kono
parents:
diff changeset
37 functions are present. Therefore, on systems using newlib, tests
kono
parents:
diff changeset
38 of builtins will fail the "l" variants, and we should therefore not
kono
parents:
diff changeset
39 define HAVE_C99_RUNTIME. Including <sys/types.h> gives us a way of
kono
parents:
diff changeset
40 seeing if _NEWLIB_VERSION is defined. Including <math.h> would work
kono
parents:
diff changeset
41 too, but the GLIBC math inlines cause us to generate inferior code,
kono
parents:
diff changeset
42 which causes the test to fail, so it is not safe. Including <limits.h>
kono
parents:
diff changeset
43 also fails because the include search paths are ordered such that GCC's
kono
parents:
diff changeset
44 version will be found before the newlib version. Similarly, uClibc
kono
parents:
diff changeset
45 lacks the C99 functions. */
kono
parents:
diff changeset
46 #include <sys/types.h>
kono
parents:
diff changeset
47 #if defined(_NEWLIB_VERSION) || defined(__UCLIBC__)
kono
parents:
diff changeset
48 #elif defined(__sun) && __STDC_VERSION__ - 0 < 199901L
kono
parents:
diff changeset
49 /* If you're including this file, you probably want to test the newer
kono
parents:
diff changeset
50 behavior, so ensure the right flags were used for each test: */
kono
parents:
diff changeset
51 #error forgot to set -std=c99.
kono
parents:
diff changeset
52 #elif defined(__sun) && ! defined (_STDC_C99)
kono
parents:
diff changeset
53 /* Solaris up to 9 doesn't have the entire C99 runtime.
kono
parents:
diff changeset
54 Solaris 10 defines _STDC_C99 if __STDC_VERSION__ is >= 199901L.
kono
parents:
diff changeset
55 This macro is defined in <sys/feature_tests.h> which is included by
kono
parents:
diff changeset
56 various system headers, in this case <sys/types.h> above. */
kono
parents:
diff changeset
57 #else
kono
parents:
diff changeset
58 #define HAVE_C99_RUNTIME
kono
parents:
diff changeset
59 #endif
kono
parents:
diff changeset
60 #endif