diff options
author | Francois-Xavier Coudert <fxcoudert@gmail.com> | 2009-05-19 18:12:57 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2009-05-19 18:12:57 +0000 |
commit | 1ffc7157ef3f33a65c7acbf23b204030b21d82fe (patch) | |
tree | a850f5f98bcf4faa69b0caf00fcc4ae7d0a2e686 /gcc | |
parent | e9351712b574f05b9621e92abd62fc386a643b8e (diff) | |
download | gcc-1ffc7157ef3f33a65c7acbf23b204030b21d82fe.zip gcc-1ffc7157ef3f33a65c7acbf23b204030b21d82fe.tar.gz gcc-1ffc7157ef3f33a65c7acbf23b204030b21d82fe.tar.bz2 |
* defaults.h (UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE)
(WCHAR_TYPE, MODIFIED_WCHAR_TYPE, PTRDIFF_TYPE, WINT_TYPE)
(INTMAX_TYPE, UINTMAX_TYPE, SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE)
(INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE)
(UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE)
(INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE)
(UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE)
(INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE)
(UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE)
(SIZE_TYPE, PID_TYPE, CHAR16_TYPE, CHAR32_TYPE): Move defaults here...
* c-common.c: ...from here.
Co-Authored-By: Hans-Peter Nilsson <hp@axis.com>
From-SVN: r147712
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/c-common.c | 174 | ||||
-rw-r--r-- | gcc/defaults.h | 175 |
3 files changed, 190 insertions, 174 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3dd7497..025e71a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2009-05-19 Francois-Xavier Coudert <fxcoudert@gmail.com> + Hans-Peter Nilsson <hp@axis.com> + + * defaults.h (UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE) + (WCHAR_TYPE, MODIFIED_WCHAR_TYPE, PTRDIFF_TYPE, WINT_TYPE) + (INTMAX_TYPE, UINTMAX_TYPE, SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE) + (INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE) + (UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE) + (INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE) + (UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE) + (INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE) + (UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE) + (SIZE_TYPE, PID_TYPE, CHAR16_TYPE, CHAR32_TYPE): Move defaults here... + * c-common.c: ...from here. + 2009-05-19 Manuel López-Ibáñez <manu@gcc.gnu.org> * c-common.c (warn_logical_operator): Remove unnecessary diff --git a/gcc/c-common.c b/gcc/c-common.c index 74f4817..46aacb5 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -55,180 +55,6 @@ along with GCC; see the file COPYING3. If not see cpp_reader *parse_in; /* Declared in c-pragma.h. */ -/* We let tm.h override the types used here, to handle trivial differences - such as the choice of unsigned int or long unsigned int for size_t. - When machines start needing nontrivial differences in the size type, - it would be best to do something here to figure out automatically - from other information what type to use. */ - -#ifndef SIZE_TYPE -#define SIZE_TYPE "long unsigned int" -#endif - -#ifndef PID_TYPE -#define PID_TYPE "int" -#endif - -/* If GCC knows the exact uint_least16_t and uint_least32_t types from - <stdint.h>, use them for char16_t and char32_t. Otherwise, use - these guesses; getting the wrong type of a given width will not - affect C++ name mangling because in C++ these are distinct types - not typedefs. */ - -#ifdef UINT_LEAST16_TYPE -#define CHAR16_TYPE UINT_LEAST16_TYPE -#else -#define CHAR16_TYPE "short unsigned int" -#endif - -#ifdef UINT_LEAST32_TYPE -#define CHAR32_TYPE UINT_LEAST32_TYPE -#else -#define CHAR32_TYPE "unsigned int" -#endif - -#ifndef WCHAR_TYPE -#define WCHAR_TYPE "int" -#endif - -/* WCHAR_TYPE gets overridden by -fshort-wchar. */ -#define MODIFIED_WCHAR_TYPE \ - (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE) - -#ifndef PTRDIFF_TYPE -#define PTRDIFF_TYPE "long int" -#endif - -#ifndef WINT_TYPE -#define WINT_TYPE "unsigned int" -#endif - -#ifndef INTMAX_TYPE -#define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ - ? "int" \ - : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ - ? "long int" \ - : "long long int")) -#endif - -#ifndef UINTMAX_TYPE -#define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ - ? "unsigned int" \ - : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ - ? "long unsigned int" \ - : "long long unsigned int")) -#endif - -/* There are no default definitions of these <stdint.h> types. */ - -#ifndef SIG_ATOMIC_TYPE -#define SIG_ATOMIC_TYPE ((const char *) NULL) -#endif - -#ifndef INT8_TYPE -#define INT8_TYPE ((const char *) NULL) -#endif - -#ifndef INT16_TYPE -#define INT16_TYPE ((const char *) NULL) -#endif - -#ifndef INT32_TYPE -#define INT32_TYPE ((const char *) NULL) -#endif - -#ifndef INT64_TYPE -#define INT64_TYPE ((const char *) NULL) -#endif - -#ifndef UINT8_TYPE -#define UINT8_TYPE ((const char *) NULL) -#endif - -#ifndef UINT16_TYPE -#define UINT16_TYPE ((const char *) NULL) -#endif - -#ifndef UINT32_TYPE -#define UINT32_TYPE ((const char *) NULL) -#endif - -#ifndef UINT64_TYPE -#define UINT64_TYPE ((const char *) NULL) -#endif - -#ifndef INT_LEAST8_TYPE -#define INT_LEAST8_TYPE ((const char *) NULL) -#endif - -#ifndef INT_LEAST16_TYPE -#define INT_LEAST16_TYPE ((const char *) NULL) -#endif - -#ifndef INT_LEAST32_TYPE -#define INT_LEAST32_TYPE ((const char *) NULL) -#endif - -#ifndef INT_LEAST64_TYPE -#define INT_LEAST64_TYPE ((const char *) NULL) -#endif - -#ifndef UINT_LEAST8_TYPE -#define UINT_LEAST8_TYPE ((const char *) NULL) -#endif - -#ifndef UINT_LEAST16_TYPE -#define UINT_LEAST16_TYPE ((const char *) NULL) -#endif - -#ifndef UINT_LEAST32_TYPE -#define UINT_LEAST32_TYPE ((const char *) NULL) -#endif - -#ifndef UINT_LEAST64_TYPE -#define UINT_LEAST64_TYPE ((const char *) NULL) -#endif - -#ifndef INT_FAST8_TYPE -#define INT_FAST8_TYPE ((const char *) NULL) -#endif - -#ifndef INT_FAST16_TYPE -#define INT_FAST16_TYPE ((const char *) NULL) -#endif - -#ifndef INT_FAST32_TYPE -#define INT_FAST32_TYPE ((const char *) NULL) -#endif - -#ifndef INT_FAST64_TYPE -#define INT_FAST64_TYPE ((const char *) NULL) -#endif - -#ifndef UINT_FAST8_TYPE -#define UINT_FAST8_TYPE ((const char *) NULL) -#endif - -#ifndef UINT_FAST16_TYPE -#define UINT_FAST16_TYPE ((const char *) NULL) -#endif - -#ifndef UINT_FAST32_TYPE -#define UINT_FAST32_TYPE ((const char *) NULL) -#endif - -#ifndef UINT_FAST64_TYPE -#define UINT_FAST64_TYPE ((const char *) NULL) -#endif - -#ifndef INTPTR_TYPE -#define INTPTR_TYPE ((const char *) NULL) -#endif - -#ifndef UINTPTR_TYPE -#define UINTPTR_TYPE ((const char *) NULL) -#endif - /* The following symbols are subsumed in the c_global_trees array, and listed here individually for documentation purposes. diff --git a/gcc/defaults.h b/gcc/defaults.h index 8ed40d9..b41f603 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -492,6 +492,181 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define LONG_LONG_ACCUM_TYPE_SIZE (LONG_LONG_FRACT_TYPE_SIZE * 2) #endif +/* We let tm.h override the types used here, to handle trivial differences + such as the choice of unsigned int or long unsigned int for size_t. + When machines start needing nontrivial differences in the size type, + it would be best to do something here to figure out automatically + from other information what type to use. */ + +#ifndef SIZE_TYPE +#define SIZE_TYPE "long unsigned int" +#endif + +#ifndef PID_TYPE +#define PID_TYPE "int" +#endif + +/* If GCC knows the exact uint_least16_t and uint_least32_t types from + <stdint.h>, use them for char16_t and char32_t. Otherwise, use + these guesses; getting the wrong type of a given width will not + affect C++ name mangling because in C++ these are distinct types + not typedefs. */ + +#ifdef UINT_LEAST16_TYPE +#define CHAR16_TYPE UINT_LEAST16_TYPE +#else +#define CHAR16_TYPE "short unsigned int" +#endif + +#ifdef UINT_LEAST32_TYPE +#define CHAR32_TYPE UINT_LEAST32_TYPE +#else +#define CHAR32_TYPE "unsigned int" +#endif + +#ifndef WCHAR_TYPE +#define WCHAR_TYPE "int" +#endif + +/* WCHAR_TYPE gets overridden by -fshort-wchar. */ +#define MODIFIED_WCHAR_TYPE \ + (flag_short_wchar ? "short unsigned int" : WCHAR_TYPE) + +#ifndef PTRDIFF_TYPE +#define PTRDIFF_TYPE "long int" +#endif + +#ifndef WINT_TYPE +#define WINT_TYPE "unsigned int" +#endif + +#ifndef INTMAX_TYPE +#define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ + ? "int" \ + : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ + ? "long int" \ + : "long long int")) +#endif + +#ifndef UINTMAX_TYPE +#define UINTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ + ? "unsigned int" \ + : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \ + ? "long unsigned int" \ + : "long long unsigned int")) +#endif + + +/* There are no default definitions of these <stdint.h> types. */ + +#ifndef SIG_ATOMIC_TYPE +#define SIG_ATOMIC_TYPE ((const char *) NULL) +#endif + +#ifndef INT8_TYPE +#define INT8_TYPE ((const char *) NULL) +#endif + +#ifndef INT16_TYPE +#define INT16_TYPE ((const char *) NULL) +#endif + +#ifndef INT32_TYPE +#define INT32_TYPE ((const char *) NULL) +#endif + +#ifndef INT64_TYPE +#define INT64_TYPE ((const char *) NULL) +#endif + +#ifndef UINT8_TYPE +#define UINT8_TYPE ((const char *) NULL) +#endif + +#ifndef UINT16_TYPE +#define UINT16_TYPE ((const char *) NULL) +#endif + +#ifndef UINT32_TYPE +#define UINT32_TYPE ((const char *) NULL) +#endif + +#ifndef UINT64_TYPE +#define UINT64_TYPE ((const char *) NULL) +#endif + +#ifndef INT_LEAST8_TYPE +#define INT_LEAST8_TYPE ((const char *) NULL) +#endif + +#ifndef INT_LEAST16_TYPE +#define INT_LEAST16_TYPE ((const char *) NULL) +#endif + +#ifndef INT_LEAST32_TYPE +#define INT_LEAST32_TYPE ((const char *) NULL) +#endif + +#ifndef INT_LEAST64_TYPE +#define INT_LEAST64_TYPE ((const char *) NULL) +#endif + +#ifndef UINT_LEAST8_TYPE +#define UINT_LEAST8_TYPE ((const char *) NULL) +#endif + +#ifndef UINT_LEAST16_TYPE +#define UINT_LEAST16_TYPE ((const char *) NULL) +#endif + +#ifndef UINT_LEAST32_TYPE +#define UINT_LEAST32_TYPE ((const char *) NULL) +#endif + +#ifndef UINT_LEAST64_TYPE +#define UINT_LEAST64_TYPE ((const char *) NULL) +#endif + +#ifndef INT_FAST8_TYPE +#define INT_FAST8_TYPE ((const char *) NULL) +#endif + +#ifndef INT_FAST16_TYPE +#define INT_FAST16_TYPE ((const char *) NULL) +#endif + +#ifndef INT_FAST32_TYPE +#define INT_FAST32_TYPE ((const char *) NULL) +#endif + +#ifndef INT_FAST64_TYPE +#define INT_FAST64_TYPE ((const char *) NULL) +#endif + +#ifndef UINT_FAST8_TYPE +#define UINT_FAST8_TYPE ((const char *) NULL) +#endif + +#ifndef UINT_FAST16_TYPE +#define UINT_FAST16_TYPE ((const char *) NULL) +#endif + +#ifndef UINT_FAST32_TYPE +#define UINT_FAST32_TYPE ((const char *) NULL) +#endif + +#ifndef UINT_FAST64_TYPE +#define UINT_FAST64_TYPE ((const char *) NULL) +#endif + +#ifndef INTPTR_TYPE +#define INTPTR_TYPE ((const char *) NULL) +#endif + +#ifndef UINTPTR_TYPE +#define UINTPTR_TYPE ((const char *) NULL) +#endif + /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */ #ifndef POINTER_SIZE #define POINTER_SIZE BITS_PER_WORD |