diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-15 05:30:01 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-15 05:30:01 +0000 |
commit | 18ef7ac206bedf84b2110dce6d5eb8289f75b8ca (patch) | |
tree | 576aea20e1d126c2bd484da7831e462f3b570f4c /gcc | |
parent | 7c5101fc32e718b23bf2c9a0beea5a276aa0e688 (diff) | |
download | gcc-18ef7ac206bedf84b2110dce6d5eb8289f75b8ca.tar.gz |
* c-parse.in (MODIFIED_WCHAR_TYPE): New macro.
(c_common_nodes_and_builtins): Use it.
(builtin_define_with_value): New function.
(cb_register_builtins): Define __SIZE_TYPE__,
__PTRDIFF_TYPE__, __WCHAR_TYPE__, and __WINT_TYPE__ here,
using builtin_define_with_value. Use consistent notation when
defining __GXX_WEAK__.
(WCHAR_TYPE_SIZE): Don't redefine.
(combine_strings): Don't use WCHAR_TYPE_SIZE.
* cppdefault.h: Don't provide defaults for SIZE_TYPE,
PTRDIFF_TYPE, WCHAR_TYPE, or WINT_TYPE.
* cppinit.c (builtin_array): Remove entries for __SIZE_TYPE__ etc.
* tradcpp.c (initialize_builtins): Likewise.
* gcc.c (cpp_unique_options): Don't muck with __WCHAR_TYPE__.
* c-lex.h (builtin_define_with_value): Prototype.
* system.h: Poison NO_BUILTIN_SIZE_TYPE, NO_BUILTIN_WCHAR_TYPE,
NO_BUILTIN_PTRDIFF_TYPE, and NO_BUILTIN_WINT_TYPE.
* doc/tm.texi: Remove mention of NO_BUILTIN_SIZE_TYPE etc.
* config/avr/avr.h, config/h8300/h8300.h, config/i386/i386.h,
config/ia64/ia64.h, config/mips/dec-osf1.h, config/mips/iris6.h,
config/mips/linux.h, config/mips/mips.h, config/mips/netbsd.h,
config/mips/osfrose.h, config/mips/sni-svr4.h, config/rs6000/aix51.h,
config/s390/linux.h, config/sh/sh.h, config/sh/sh64.h,
config/sparc/linux64.h, config/sparc/netbsd-elf.h,
config/sparc/sol2-bi.h, config/sparc/sparc.h:
Do not define NO_BUILTIN_SIZE_TYPE etc. Remove all references
to __SIZE_TYPE__ etc from all spec strings. When this makes
extra specs empty, delete them.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53472 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 34 | ||||
-rw-r--r-- | gcc/c-common.c | 43 | ||||
-rw-r--r-- | gcc/c-lex.h | 3 | ||||
-rw-r--r-- | gcc/config/avr/avr.h | 22 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.h | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 21 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.h | 6 | ||||
-rw-r--r-- | gcc/config/mips/dec-osf1.h | 5 | ||||
-rw-r--r-- | gcc/config/mips/iris6.h | 14 | ||||
-rw-r--r-- | gcc/config/mips/linux.h | 8 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 135 | ||||
-rw-r--r-- | gcc/config/mips/netbsd.h | 22 | ||||
-rw-r--r-- | gcc/config/mips/osfrose.h | 4 | ||||
-rw-r--r-- | gcc/config/mips/sni-svr4.h | 3 | ||||
-rw-r--r-- | gcc/config/rs6000/aix51.h | 11 | ||||
-rw-r--r-- | gcc/config/s390/linux.h | 18 | ||||
-rw-r--r-- | gcc/config/sh/sh.h | 10 | ||||
-rw-r--r-- | gcc/config/sh/sh64.h | 3 | ||||
-rw-r--r-- | gcc/config/sparc/linux64.h | 1 | ||||
-rw-r--r-- | gcc/config/sparc/netbsd-elf.h | 16 | ||||
-rw-r--r-- | gcc/config/sparc/sol2-bi.h | 8 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.h | 15 | ||||
-rw-r--r-- | gcc/cppdefault.h | 24 | ||||
-rw-r--r-- | gcc/cppinit.c | 12 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 40 | ||||
-rw-r--r-- | gcc/gcc.c | 1 | ||||
-rw-r--r-- | gcc/system.h | 3 | ||||
-rw-r--r-- | gcc/tradcpp.c | 12 |
28 files changed, 94 insertions, 405 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c7c0dccc945..8b4a89679c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,37 @@ +2002-05-14 Zack Weinberg <zack@codesourcery.com> + + * c-parse.in (MODIFIED_WCHAR_TYPE): New macro. + (c_common_nodes_and_builtins): Use it. + (builtin_define_with_value): New function. + (cb_register_builtins): Define __SIZE_TYPE__, + __PTRDIFF_TYPE__, __WCHAR_TYPE__, and __WINT_TYPE__ here, + using builtin_define_with_value. Use consistent notation when + defining __GXX_WEAK__. + (WCHAR_TYPE_SIZE): Don't redefine. + (combine_strings): Don't use WCHAR_TYPE_SIZE. + + * cppdefault.h: Don't provide defaults for SIZE_TYPE, + PTRDIFF_TYPE, WCHAR_TYPE, or WINT_TYPE. + * cppinit.c (builtin_array): Remove entries for __SIZE_TYPE__ etc. + * tradcpp.c (initialize_builtins): Likewise. + * gcc.c (cpp_unique_options): Don't muck with __WCHAR_TYPE__. + + * c-lex.h (builtin_define_with_value): Prototype. + * system.h: Poison NO_BUILTIN_SIZE_TYPE, NO_BUILTIN_WCHAR_TYPE, + NO_BUILTIN_PTRDIFF_TYPE, and NO_BUILTIN_WINT_TYPE. + * doc/tm.texi: Remove mention of NO_BUILTIN_SIZE_TYPE etc. + + * config/avr/avr.h, config/h8300/h8300.h, config/i386/i386.h, + config/ia64/ia64.h, config/mips/dec-osf1.h, config/mips/iris6.h, + config/mips/linux.h, config/mips/mips.h, config/mips/netbsd.h, + config/mips/osfrose.h, config/mips/sni-svr4.h, config/rs6000/aix51.h, + config/s390/linux.h, config/sh/sh.h, config/sh/sh64.h, + config/sparc/linux64.h, config/sparc/netbsd-elf.h, + config/sparc/sol2-bi.h, config/sparc/sparc.h: + Do not define NO_BUILTIN_SIZE_TYPE etc. Remove all references + to __SIZE_TYPE__ etc from all spec strings. When this makes + extra specs empty, delete them. + 2002-05-14 John David Anglin <dave@hiauly1.hia.nrc.ca> * pa.c (override_options): Override TARGET_JUMP_IN_DELAY when scheduling diff --git a/gcc/c-common.c b/gcc/c-common.c index 8233187b92a..f60a27f864c 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -41,9 +41,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "except.h" /* For USING_SJLJ_EXCEPTIONS. */ cpp_reader *parse_in; /* Declared in c-lex.h. */ -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE TYPE_PRECISION (wchar_type_node) - /* 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, @@ -58,6 +55,10 @@ cpp_reader *parse_in; /* Declared in c-lex.h. */ #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 @@ -802,7 +803,8 @@ combine_strings (strings) } else { - const int nzeros = (WCHAR_TYPE_SIZE / BITS_PER_UNIT) - 1; + const int nzeros = (TYPE_PRECISION (wchar_type_node) + / BITS_PER_UNIT) - 1; int j, k; if (BYTES_BIG_ENDIAN) @@ -2872,9 +2874,7 @@ c_common_nodes_and_builtins () (*targetm.init_builtins) (); /* This is special for C++ so functions can be overloaded. */ - wchar_type_node = get_identifier (flag_short_wchar - ? "short unsigned int" - : WCHAR_TYPE); + wchar_type_node = get_identifier (MODIFIED_WCHAR_TYPE); wchar_type_node = TREE_TYPE (identifier_global_value (wchar_type_node)); wchar_type_size = TYPE_PRECISION (wchar_type_node); if (c_language == clk_cplusplus) @@ -4321,7 +4321,7 @@ cb_register_builtins (pfile) if (c_language == clk_cplusplus) { if (SUPPORTS_ONE_ONLY) - cpp_define (pfile, "__GXX_WEAK__"); + cpp_define (pfile, "__GXX_WEAK__=1"); else cpp_define (pfile, "__GXX_WEAK__=0"); } @@ -4330,6 +4330,12 @@ cb_register_builtins (pfile) if (USING_SJLJ_EXCEPTIONS) cpp_define (pfile, "__USING_SJLJ_EXCEPTIONS__"); + /* stddef.h needs to know these. */ + builtin_define_with_value ("__SIZE_TYPE__", SIZE_TYPE); + builtin_define_with_value ("__PTRDIFF_TYPE__", PTRDIFF_TYPE); + builtin_define_with_value ("__WCHAR_TYPE__", MODIFIED_WCHAR_TYPE); + builtin_define_with_value ("__WINT_TYPE__", WINT_TYPE); + /* A straightforward target hook doesn't work, because of problems linking that hook's body when part of non-C front ends. */ TARGET_CPU_CPP_BUILTINS (); @@ -4379,6 +4385,27 @@ builtin_define_std (macro) } } +/* Pass an object-like macro and a value to define it to. */ +void +builtin_define_with_value (macro, expansion) + const char *macro; + const char *expansion; +{ + char *buf, *q; + size_t mlen = strlen (macro); + size_t elen = strlen (expansion); + + q = buf = alloca (mlen + elen + 2); + memcpy (q, macro, mlen); + q += mlen; + *q++ = '='; + memcpy (q, expansion, elen); + q += elen; + *q = '\0'; + + cpp_define (parse_in, buf); +} + /* Front end initialization common to C, ObjC and C++. */ const char * c_common_init (filename) diff --git a/gcc/c-lex.h b/gcc/c-lex.h index 049bf6b3623..c9af00903a6 100644 --- a/gcc/c-lex.h +++ b/gcc/c-lex.h @@ -49,4 +49,7 @@ extern struct cpp_reader* parse_in; "_mips". */ extern void builtin_define_std PARAMS ((const char *)); +/* Pass an object-like macro and a value to define it to. */ +extern void builtin_define_with_value PARAMS ((const char *, const char *)); + #endif /* ! GCC_C_LEX_H */ diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 949f45f8ded..66ca80c663f 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -2653,8 +2653,8 @@ extern int avr_case_values_threshold; %{mmcu=attiny15: %(cpp_avr1) -D__AVR_ATtiny15__} \ %{mmcu=attiny28: %(cpp_avr1) -D__AVR_ATtiny28__} \ %{mno-interrupts:-D__NO_INTERRUPTS__} \ -%{mint8:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long -D__INT_MAX__=127} \ -%{!mint*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int -D__INT_MAX__=32767} \ +%{mint8:-D__INT_MAX__=127} \ +%{!mint*:-D__INT_MAX__=32767} \ %{posix:-D_POSIX_SOURCE}" /* A C string constant that tells the GNU CC driver program options to pass to CPP. It can also specify how to translate options you @@ -2662,24 +2662,6 @@ extern int avr_case_values_threshold; Do not define this macro if it does not need to do anything. */ -#define NO_BUILTIN_SIZE_TYPE -/* If this macro is defined, the preprocessor will not define the - builtin macro `__SIZE_TYPE__'. The macro `__SIZE_TYPE__' must - then be defined by `CPP_SPEC' instead. - - This should be defined if `SIZE_TYPE' depends on target dependent - flags which are not accessible to the preprocessor. Otherwise, it - should not be defined. */ - -#define NO_BUILTIN_PTRDIFF_TYPE -/* If this macro is defined, the preprocessor will not define the - builtin macro `__PTRDIFF_TYPE__'. The macro `__PTRDIFF_TYPE__' - must then be defined by `CPP_SPEC' instead. - - This should be defined if `PTRDIFF_TYPE' depends on target - dependent flags which are not accessible to the preprocessor. - Otherwise, it should not be defined. */ - #define CC1_SPEC "%{profile:-p}" /* A C string constant that tells the GNU CC driver program options to pass to `cc1'. It can also specify how to translate options you diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h index 79562fcd602..ccf8c461cbc 100644 --- a/gcc/config/h8300/h8300.h +++ b/gcc/config/h8300/h8300.h @@ -44,9 +44,6 @@ extern const char * const *h8_reg_names; #define CPP_SPEC \ "%{!mh:%{!ms:-D__H8300__}} %{mh:-D__H8300H__} %{ms:-D__H8300S__} \ - %{!mh:%{!ms:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ - %{mh:-D__SIZE_TYPE__=unsigned\\ long -D__PTRDIFF_TYPE__=long} \ - %{ms:-D__SIZE_TYPE__=unsigned\\ long -D__PTRDIFF_TYPE__=long} \ %{!mh:%{!ms:-Acpu=h8300 -Amachine=h8300}} \ %{mh:-Acpu=h8300h -Amachine=h8300h} \ %{ms:-Acpu=h8300s -Amachine=h8300s} \ @@ -974,8 +971,6 @@ struct cum_arg /* ANSI C types. We use longs for the 300H because ints can be 16 or 32. GCC requires SIZE_TYPE to be the same size as pointers. */ -#define NO_BUILTIN_SIZE_TYPE -#define NO_BUILTIN_PTRDIFF_TYPE #define SIZE_TYPE (TARGET_H8300 ? "unsigned int" : "long unsigned int") #define PTRDIFF_TYPE (TARGET_H8300 ? "int" : "long int") diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 680605b9955..7ed0ddefd59 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -554,27 +554,12 @@ extern int ix86_arch; #endif #endif /* CPP_CPU_DEFAULT_SPEC */ -#ifdef TARGET_BI_ARCH -#define NO_BUILTIN_SIZE_TYPE -#define NO_BUILTIN_PTRDIFF_TYPE -#endif - -#ifdef NO_BUILTIN_SIZE_TYPE -#define CPP_CPU32_SIZE_TYPE_SPEC \ - " -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int" -#define CPP_CPU64_SIZE_TYPE_SPEC \ - " -D__SIZE_TYPE__=unsigned\\ long\\ int -D__PTRDIFF_TYPE__=long\\ int" -#else -#define CPP_CPU32_SIZE_TYPE_SPEC "" -#define CPP_CPU64_SIZE_TYPE_SPEC "" -#endif - #define CPP_CPU32_SPEC \ "-Acpu=i386 -Amachine=i386 %{!ansi:%{!std=c*:%{!std=i*:-Di386}}} -D__i386 \ --D__i386__ %(cpp_cpu32sizet)" +-D__i386__" #define CPP_CPU64_SPEC \ - "-Acpu=x86_64 -Amachine=x86_64 -D__x86_64 -D__x86_64__ %(cpp_cpu64sizet)" + "-Acpu=x86_64 -Amachine=x86_64 -D__x86_64 -D__x86_64__" #define CPP_CPUCOMMON_SPEC "\ %{march=i386:%{!mcpu*:-D__tune_i386__ }}\ @@ -662,8 +647,6 @@ extern int ix86_arch; { "cpp_cpu", CPP_CPU_SPEC }, \ { "cpp_cpu32", CPP_CPU32_SPEC }, \ { "cpp_cpu64", CPP_CPU64_SPEC }, \ - { "cpp_cpu32sizet", CPP_CPU32_SIZE_TYPE_SPEC }, \ - { "cpp_cpu64sizet", CPP_CPU64_SIZE_TYPE_SPEC }, \ { "cpp_cpucommon", CPP_CPUCOMMON_SPEC }, \ { "cc1_cpu", CC1_CPU_SPEC }, \ SUBTARGET_EXTRA_SPECS diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index fd880facde9..0b2aea59efd 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -213,12 +213,6 @@ extern const char *ia64_fixed_range_string; %(cpp_cpu) \ -D__LONG_MAX__=9223372036854775807L" -/* This is always "long" so it doesn't "change" in ILP32 vs. LP64. */ -/* #define NO_BUILTIN_SIZE_TYPE */ - -/* This is always "long" so it doesn't "change" in ILP32 vs. LP64. */ -/* #define NO_BUILTIN_PTRDIFF_TYPE */ - /* A C string constant that tells the GNU CC driver program options to pass to `cc1'. It can also specify how to translate options you give to GNU CC into options for GNU CC to pass to the `cc1'. */ diff --git a/gcc/config/mips/dec-osf1.h b/gcc/config/mips/dec-osf1.h index 2501cad45a9..3f54d14c3b4 100644 --- a/gcc/config/mips/dec-osf1.h +++ b/gcc/config/mips/dec-osf1.h @@ -43,11 +43,6 @@ Boston, MA 02111-1307, USA. */ #define WCHAR_TYPE "short unsigned int" #define WCHAR_TYPE_SIZE SHORT_TYPE_SIZE -#undef SUBTARGET_CPP_SIZE_SPEC -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \ -%{!mlong64:-D__PTRDIFF_TYPE__=int}" - /* turn off collect2 COFF support, since ldfcn now has elf declaration */ #undef OBJECT_FORMAT_COFF diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h index 56ea80753b7..71a18e83a16 100644 --- a/gcc/config/mips/iris6.h +++ b/gcc/config/mips/iris6.h @@ -44,8 +44,6 @@ Boston, MA 02111-1307, USA. */ /* wchar_t is defined differently with and without -mabi=64. */ -#define NO_BUILTIN_WCHAR_TYPE - #undef WCHAR_TYPE #define WCHAR_TYPE (Pmode == DImode ? "int" : "long int") @@ -54,8 +52,6 @@ Boston, MA 02111-1307, USA. */ /* Same for wint_t. */ -#define NO_BUILTIN_WINT_TYPE - #undef WINT_TYPE #define WINT_TYPE (Pmode == DImode ? "int" : "long int") @@ -78,15 +74,6 @@ Boston, MA 02111-1307, USA. */ -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \ -Asystem=unix -Asystem=svr4 -Acpu=mips -Amachine=sgi" -#undef SUBTARGET_CPP_SIZE_SPEC -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=32|mabi=n32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ --D__WCHAR_TYPE__=long\\ int -D__WINT_TYPE__=long\\ int} \ -%{mabi=64: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \ --D__WCHAR_TYPE__=int -D__WINT_TYPE__=int} \ -%{!mabi*: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ --D__WCHAR_TYPE__=long\\ int -D__WINT_TYPE__=long\\ int}" - /* We must make -mips3 do what -mlong64 used to do. */ /* ??? If no mipsX option given, but a mabi=X option is, then should set _MIPS_ISA based on the mabi=X option. */ @@ -94,7 +81,6 @@ Boston, MA 02111-1307, USA. */ _MIPS_SIM based on the mipsX option. */ /* ??? Same for _MIPS_SZINT. */ /* ??? Same for _MIPS_SZPTR. */ -/* ??? Same for __SIZE_TYPE and __PTRDIFF_TYPE. */ #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "\ %{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE} \ diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index f1ff69e0504..7e2b9ea671e 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -142,13 +142,6 @@ void FN () \ -Amachine=mips -D__ELF__ -D__PIC__ -D__pic__" #endif -#undef SUBTARGET_CPP_SIZE_SPEC -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mabi=n32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mabi=64: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ -%{!mabi*: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}" - /* We must make -mips3 do what -mlong64 used to do. */ /* ??? If no mipsX option given, but a mabi=X option is, then should set _MIPS_ISA based on the mabi=X option. */ @@ -156,7 +149,6 @@ void FN () \ _MIPS_SIM based on the mipsX option. */ /* ??? Same for _MIPS_SZINT. */ /* ??? Same for _MIPS_SZPTR. */ -/* ??? Same for __SIZE_TYPE and __PTRDIFF_TYPE. */ #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "\ %{mfp32: -D_MIPS_FPSET=16} \ diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 670b4137a46..a6467c066dd 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1013,11 +1013,6 @@ extern int mips_abi; /* Preprocessor specs. */ -/* SUBTARGET_CPP_SIZE_SPEC defines SIZE_TYPE and PTRDIFF_TYPE. It may - be overridden by subtargets. */ - -#ifndef SUBTARGET_CPP_SIZE_SPEC - /* Rules for SIZE_TYPE and PTRDIFF_TYPE are: both gp64 and long64 (not the options, but the corresponding flags, @@ -1043,20 +1038,6 @@ extern int mips_abi; /* 32-bit cases first. */ #if MIPS_ABI_DEFAULT == ABI_EABI -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=eabi|!mabi=*:\ - %{mips1|mips2|mips32|mgp32|mlong32: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mips1:%{!mips2:%{!mips32:%{!mgp32:%{!mlong32: \ - %{mips3|mips4|mips5|mips64|mgp64: \ - -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{!mips3:%{!mips4:%{!mips5:%{!mips64:%{!mgp64: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}} \ -%{mabi=o64:\ - %{!mgp64|!-mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mgp64:%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}} \ -%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -" #define LONG_MAX_SPEC "\ %{mlong64:-D__LONG_MAX__=9223372036854775807L}\ %{!mlong64:\ @@ -1076,76 +1057,10 @@ extern int mips_abi; " #endif -#if MIPS_ABI_DEFAULT == ABI_O64 -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=eabi:\ - %{mips1|mips2|mips32|mgp32|mlong32: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mips1:%{!mips2:%{!mips32:%{!mgp32:%{!mlong32: \ - %{mips3|mips4|mips5|mips64|mgp64: \ - -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{!mips3:%{!mips4:%{!mips5:%{!mips64:%{!mgp64: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}} \ -%{mabi=o64|!mabi=*:\ - %{!mgp64|!-mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mgp64:%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}} \ -%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mabi=meabi:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -" -#endif - -#if MIPS_ABI_DEFAULT == ABI_32 -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=eabi:\ - %{mips1|mips2|mips32|mgp32|mlong32: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mips1:%{!mips2:%{!mips32:%{!mgp32:%{!mlong32: \ - %{mips3|mips4|mips5|mips64|mgp64: \ - -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{!mips3:%{!mips4:%{!mips5:%{!mips64:%{!mgp64: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}} \ -%{mabi=o64:\ - %{!mgp64|!-mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mgp64:%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}} \ -%{mabi=32|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mabi=meabi:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -" -#endif - -#if MIPS_ABI_DEFAULT == ABI_MEABI -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=eabi:\ - %{mips1|mips2|mips32|mgp32|mlong32: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mips1:%{!mips2:%{!mips32:%{!mgp32:%{!mlong32: \ - %{mips3|mips4|mips5|mips64|mgp64: \ - -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ - %{!mips3:%{!mips4:%{!mips5:%{!mips64:%{!mgp64: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}} \ -%{mabi=o64:\ - %{!mgp64|!-mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{mgp64:%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}} \ -%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mabi=meabi|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -" -#endif - #else /* 64-bit default ISA. */ #if MIPS_ABI_DEFAULT == ABI_EABI -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=eabi|!mabi=*: \ - %{mips1|mips2|mips32|mgp32|mlong32: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mips1:%{!mips2:%{!mips32:%{!mgp32:%{!mlong32: \ - -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}} \ -%{mabi=o64:\ - %{mgp32|!-mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mgp32:%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}} \ -%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mabi=meabi:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -" #define LONG_MAX_SPEC "\ %{mlong64:-D__LONG_MAX__=9223372036854775807L}\ %{!mlong64:\ @@ -1163,53 +1078,6 @@ extern int mips_abi; " #endif -#if MIPS_ABI_DEFAULT == ABI_O64 -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=eabi: \ - %{mips1|mips2|mips32|mgp32|mlong32: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mips1:%{!mips2:%{!mips32:%{!mgp32:%{!mlong32: \ - -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}} \ -%{mabi=o64|!mabi=*:\ - %{mgp32|!-mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mgp32:%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}} \ -%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mabi=meabi:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -" -#endif - -#if MIPS_ABI_DEFAULT == ABI_32 -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=eabi:\ - %{mips1|mips2|mips32|mgp32|mlong32: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mips1:%{!mips2:%{!mips32:%{!mgp32:%{!mlong32: \ - -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}} \ -%{mabi=o64:\ - %{mgp32|!-mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mgp32:%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}} \ -%{mabi=32|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mabi=meabi:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -" -#endif - -#if MIPS_ABI_DEFAULT == ABI_MEABI -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mabi=eabi:\ - %{mips1|mips2|mips32|mgp32|mlong32: \ - -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mips1:%{!mips2:%{!mips32:%{!mgp32:%{!mlong32: \ - -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}} \ -%{mabi=o64:\ - %{mgp32|!-mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ - %{!mgp32:%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}} \ -%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{mabi=meabi|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -" -#endif - -#endif - #endif /* SUBTARGET_CPP_SPEC is passed to the preprocessor. It may be @@ -1273,7 +1141,6 @@ extern int mips_abi; { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ { "cc1_cpu_spec", CC1_CPU_SPEC}, \ { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ - { "subtarget_cpp_size_spec", SUBTARGET_CPP_SIZE_SPEC }, \ { "long_max_spec", LONG_MAX_SPEC }, \ { "cpp_fpr_spec", CPP_FPR_SPEC }, \ { "mips_as_asm_spec", MIPS_AS_ASM_SPEC }, \ @@ -4940,12 +4807,10 @@ while (0) /* Default definitions for size_t and ptrdiff_t. */ #ifndef SIZE_TYPE -#define NO_BUILTIN_SIZE_TYPE #define SIZE_TYPE (Pmode == DImode ? "long unsigned int" : "unsigned int") #endif #ifndef PTRDIFF_TYPE -#define NO_BUILTIN_PTRDIFF_TYPE #define PTRDIFF_TYPE (Pmode == DImode ? "long int" : "int") #endif diff --git a/gcc/config/mips/netbsd.h b/gcc/config/mips/netbsd.h index c625b9d2cdb..f3f9094f7d0 100644 --- a/gcc/config/mips/netbsd.h +++ b/gcc/config/mips/netbsd.h @@ -109,26 +109,14 @@ Boston, MA 02111-1307, USA. */ %{EL:-U__MIPSEB__ -D__MIPSEL__} \ %(subtarget_cpp_spec) " - -/* Provide a SUBTARGET_CPP_SIZE_SPEC appropriate for NetBSD. In - addition to the normal work done by this spec, we also define - __LONG64 or not (so that <machine/ansi.h> can tell). */ - -#undef SUBTARGET_CPP_SIZE_SPEC -#define SUBTARGET_CPP_SIZE_SPEC \ - "%{mlong64: \ - %{!mips1: \ - %{!mips2: \ - %{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int -D__LONG64}}}} \ - %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int -U__LONG64}" - - /* Provide a SUBTARGET_CPP_SPEC appropriate for NetBSD. Currently, - we just deal with the GCC option '-posix'. */ + we just deal with the GCC option '-posix', and define __LONG64 + as appropriate for <machine/ansi.h>. */ #undef SUBTARGET_CPP_SPEC -#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE}" - +#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} \ + %{mlong64:%{!mips1:%{!mips2:%{!mips32:-D__LONG64}}}} \ + %{!mlong64:-U__LONG64}" /* Provide a LINK_SPEC appropriate for a NetBSD/mips target. This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for diff --git a/gcc/config/mips/osfrose.h b/gcc/config/mips/osfrose.h index aa9a585d2b8..62d61e6dffd 100644 --- a/gcc/config/mips/osfrose.h +++ b/gcc/config/mips/osfrose.h @@ -34,10 +34,6 @@ Boston, MA 02111-1307, USA. */ -DOSF -DOSF1 -Dbsd4_2 -DMIPSEL -Dhost_mips -Dmips -Dunix -DR3000 -DSYSTYPE_BSD \ -Asystem=unix -Asystem=xpg4 -Acpu=mips -Amachine=mips" -#define SUBTARGET_CPP_SIZE_SPEC "\ -%{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \ -%{!mlong64:-D__PTRDIFF_TYPE__=int}" - #define SUBTARGET_CPP_SPEC "\ %{.S: %{!ansi:%{!traditional-cpp: -traditional}}}" diff --git a/gcc/config/mips/sni-svr4.h b/gcc/config/mips/sni-svr4.h index e1783556490..f4f772f94eb 100644 --- a/gcc/config/mips/sni-svr4.h +++ b/gcc/config/mips/sni-svr4.h @@ -26,9 +26,6 @@ Boston, MA 02111-1307, USA. */ -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_SVR4 \ -Asystem=unix -Asystem=svr4 -Acpu=mips -Amachine=mips" -#define SUBTARGET_CPP_SIZE_SPEC "\ --D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int" - #define LINK_SPEC "\ %{G*} \ %{!mgas: \ diff --git a/gcc/config/rs6000/aix51.h b/gcc/config/rs6000/aix51.h index 121c7ba5caf..96a6a631852 100644 --- a/gcc/config/rs6000/aix51.h +++ b/gcc/config/rs6000/aix51.h @@ -105,9 +105,7 @@ do { \ #undef CPP_SPEC #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\ %{ansi: -D_ANSI_C_SOURCE}\ - %{!maix64: -D__WCHAR_TYPE__=short\\ unsigned\\ int}\ - %{maix64: -D__64BIT__ -D_ARCH_PPC -D__LONG_MAX__=9223372036854775807L \ - -D__WCHAR_TYPE__=unsigned\\ int}\ + %{maix64: -D__64BIT__ -D_ARCH_PPC -D__LONG_MAX__=9223372036854775807L} %{mpe: -I/usr/lpp/ppe.poe/include}\ %{pthread: -D_THREAD_SAFE}\ %(cpp_cpu)" @@ -120,9 +118,7 @@ do { \ -D_XOPEN_SOURCE_EXTENDED=1 \ -D_LARGE_FILE_API \ -D_ALL_SOURCE \ - %{!maix64: -D__WCHAR_TYPE__=short\\ unsigned\\ int}\ - %{maix64: -D__64BIT__ -D_ARCH_PPC -D__LONG_MAX__=9223372036854775807L \ - -D__WCHAR_TYPE__=unsigned\\ int}\ + %{maix64: -D__64BIT__ -D_ARCH_PPC -D__LONG_MAX__=9223372036854775807L} %{mpe: -I/usr/lpp/ppe.poe/include}\ %{pthread: -D_THREAD_SAFE}\ %(cpp_cpu)" @@ -207,9 +203,6 @@ do { \ #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "long int" -/* __WCHAR_TYPE__ is dynamic, so do not define it statically. */ -#define NO_BUILTIN_WCHAR_TYPE - /* Type used for wchar_t, as a string used in a declaration. */ #undef WCHAR_TYPE #define WCHAR_TYPE (!TARGET_64BIT ? "short unsigned int" : "unsigned int") diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h index a0336bfecd8..b19561c35ab 100644 --- a/gcc/config/s390/linux.h +++ b/gcc/config/s390/linux.h @@ -50,28 +50,20 @@ Boston, MA 02111-1307, USA. */ /* Target specific preprocessor settings. */ -#define NO_BUILTIN_SIZE_TYPE -#define NO_BUILTIN_PTRDIFF_TYPE - #define CPP_PREDEFINES \ "-Dunix -Asystem(unix) -D__gnu_linux__ -Dlinux -Asystem(linux) -D__ELF__ \ -Acpu(s390) -Amachine(s390) -D__s390__" -#define CPP_ARCH31_SPEC \ - "-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=int" -#define CPP_ARCH64_SPEC \ - "-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \ - -D__s390x__ -D__LONG_MAX__=9223372036854775807L" +#define CPP_ARCH31_SPEC "" +#define CPP_ARCH64_SPEC "-D__s390x__ -D__LONG_MAX__=9223372036854775807L" -#ifdef DEFAULT_TARGET_64BIT #undef CPP_SPEC -#define CPP_SPEC "%{m31:%(cpp_arch31)} %{!m31:%(cpp_arch64)}" +#ifdef DEFAULT_TARGET_64BIT +#define CPP_SPEC "%{!m31:%(cpp_arch64)}" #else -#undef CPP_SPEC -#define CPP_SPEC "%{m64:%(cpp_arch64)} %{!m64:%(cpp_arch31)}" +#define CPP_SPEC "%{m64:%(cpp_arch64)}" #endif - /* Target specific compiler settings. */ /* ??? -fcaller-saves sometimes doesn't work. Fix this! */ diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 5a5094e1c9d..18c3b48d0f4 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -56,8 +56,6 @@ extern int code_for_indirect_jump_scratch; %{m4-single:-D__SH4_SINGLE__} \ %{m4-nofpu:-D__sh3__ -D__SH4_NOFPU__} \ %{m4:-D__SH4__} \ -%{m1|m2|m3*|m4*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ -%{m5*:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!m1:%{!m2:%{!m3*:%{!m4*:%{!m5*:%(cpp_default_cpu_spec)}}}}} \ %{mhitachi:-D__HITACHI__} \ %(subtarget_cpp_spec) \ @@ -72,8 +70,7 @@ extern int code_for_indirect_jump_scratch; #endif #ifndef CPP_DEFAULT_CPU_SPEC -#define CPP_DEFAULT_CPU_SPEC \ - "-D__sh1__ -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int" +#define CPP_DEFAULT_CPU_SPEC "-D__sh1__" #endif @@ -2509,14 +2506,9 @@ while (0) /* 'char' is signed by default. */ #define DEFAULT_SIGNED_CHAR 1 -/* We -Define SIZE_TYPE in CPP_SPEC. */ -#define NO_BUILTIN_SIZE_TYPE 1 - /* The type of size_t unsigned int. */ #define SIZE_TYPE (TARGET_SH5 ? "long unsigned int" : "unsigned int") -#define NO_BUILTIN_PTRDIFF_TYPE 1 - #undef PTRDIFF_TYPE #define PTRDIFF_TYPE (TARGET_SH5 ? "long int" : "int") diff --git a/gcc/config/sh/sh64.h b/gcc/config/sh/sh64.h index a2e225d841b..1797cd77f24 100644 --- a/gcc/config/sh/sh64.h +++ b/gcc/config/sh/sh64.h @@ -24,8 +24,7 @@ Boston, MA 02111-1307, USA. */ fputs (" (SuperH SH)", stderr); #undef CPP_DEFAULT_CPU_SPEC -#define CPP_DEFAULT_CPU_SPEC "-D__SH5__=32 -D__SHMEDIA__ \ --D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int" +#define CPP_DEFAULT_CPU_SPEC "-D__SH5__=32 -D__SHMEDIA__" #undef ASM_SPEC #define ASM_SPEC "%(subtarget_asm_endian_spec) %{mrelax:-relax} \ diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index 105f95496d8..d29f6aa597d 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -44,7 +44,6 @@ Boston, MA 02111-1307, USA. */ #undef CPP_ARCH32_SPEC #define CPP_ARCH32_SPEC "%{mlong-double-128:-D__LONG_DOUBLE_128__} \ --D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" #endif diff --git a/gcc/config/sparc/netbsd-elf.h b/gcc/config/sparc/netbsd-elf.h index 43b3e5063ef..f4ffb68c49e 100644 --- a/gcc/config/sparc/netbsd-elf.h +++ b/gcc/config/sparc/netbsd-elf.h @@ -37,22 +37,6 @@ Boston, MA 02111-1307, USA. */ #undef CPP_SUBTARGET_SPEC32 #define CPP_SUBTARGET_SPEC32 "-D__sparc %{posix:-D_POSIX_SOURCE}" -/* CPP_ARCH32_SPEC and CPP_ARCH64_SPEC are wrong from sparc/sparc.h; we - always want the non-SPARC_BI_ARCH versions, since the SPARC_BI_ARCH - versions define __SIZE_TYPE__ and __PTRDIFF_TYPE__ incorrectly for - NetBSD. */ -#undef CPP_ARCH32_SPEC -#define CPP_ARCH32_SPEC "-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" - -#undef CPP_ARCH64_SPEC -#define CPP_ARCH64_SPEC "-D__arch64__ -Acpu=sparc64 -Amachine=sparc64" - -/* sparc/sparc.h defines NO_BUILTIN_SIZE_TYPE and NO_BUILTIN_PTRDIFF_TYPE - if SPARC_BI_ARCH is defined. This is wrong for NetBSD; size_t and - ptrdiff_t do not change for 32-bit vs. 64-bit. */ -#undef NO_BUILTIN_PTRDIFF_TYPE -#undef NO_BUILTIN_SIZE_TYPE - /* SIZE_TYPE and PTRDIFF_TYPE are wrong from sparc/sparc.h. */ #undef SIZE_TYPE #define SIZE_TYPE "long unsigned int" diff --git a/gcc/config/sparc/sol2-bi.h b/gcc/config/sparc/sol2-bi.h index d097a20db94..fcb65dab31a 100644 --- a/gcc/config/sparc/sol2-bi.h +++ b/gcc/config/sparc/sol2-bi.h @@ -125,7 +125,6 @@ /* wchar_t is called differently in <wchar.h> for 32 and 64-bit compilations. This is called for by SCD 2.4.1, p. 6-83, Figure 6-65 (32-bit) and p. 6P-10, Figure 6.38 (64-bit). */ -#define NO_BUILTIN_WCHAR_TYPE #undef WCHAR_TYPE #define WCHAR_TYPE (TARGET_ARCH64 ? "int" : "long int") @@ -136,7 +135,6 @@ /* Same for wint_t. See SCD 2.4.1, p. 6-83, Figure 6-66 (32-bit). There's no corresponding 64-bit definition, but this is what Solaris 8 <iso/wchar_iso.h> uses. */ -#define NO_BUILTIN_WINT_TYPE #undef WINT_TYPE #define WINT_TYPE (TARGET_ARCH64 ? "int" : "long int") @@ -145,12 +143,10 @@ #define WINT_TYPE_SIZE 32 #undef CPP_ARCH32_SPEC -#define CPP_ARCH32_SPEC "-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ --D__WCHAR_TYPE__=long\\ int -D__WINT_TYPE__=long\\ int \ +#define CPP_ARCH32_SPEC "\ -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" #undef CPP_ARCH64_SPEC -#define CPP_ARCH64_SPEC "-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \ --D__WCHAR_TYPE__=int -D__WINT_TYPE__=int \ +#define CPP_ARCH64_SPEC "\ -D__arch64__ -Acpu=sparc64 -Amachine=sparcv9 -D__sparcv9" #undef CPP_ARCH_SPEC diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 1b3b2ead507..8429a7f554b 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -246,20 +246,9 @@ Unrecognized value in TARGET_CPU_DEFAULT. sparc64 in 32 bit environments, so for now we only use `sparc64' in 64 bit environments. */ -#ifdef SPARC_BI_ARCH - -#define CPP_ARCH32_SPEC "-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \ --D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" -#define CPP_ARCH64_SPEC "-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int \ --D__arch64__ -Acpu=sparc64 -Amachine=sparc64" - -#else - #define CPP_ARCH32_SPEC "-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc" #define CPP_ARCH64_SPEC "-D__arch64__ -Acpu=sparc64 -Amachine=sparc64" -#endif - #define CPP_ARCH_DEFAULT_SPEC \ (DEFAULT_ARCH32_P ? CPP_ARCH32_SPEC : CPP_ARCH64_SPEC) @@ -372,10 +361,6 @@ Unrecognized value in TARGET_CPU_DEFAULT. #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G %L" -#ifdef SPARC_BI_ARCH -#define NO_BUILTIN_PTRDIFF_TYPE -#define NO_BUILTIN_SIZE_TYPE -#endif #define PTRDIFF_TYPE (TARGET_ARCH64 ? "long int" : "int") #define SIZE_TYPE (TARGET_ARCH64 ? "long unsigned int" : "unsigned int") diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h index cda691d5956..5d5d74aadf6 100644 --- a/gcc/cppdefault.h +++ b/gcc/cppdefault.h @@ -48,30 +48,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ it would be best to do something here to figure out automatically from other information what type to use. */ -/* The string value for __SIZE_TYPE__. */ - -#ifndef SIZE_TYPE -#define SIZE_TYPE "long unsigned int" -#endif - -/* The string value for __PTRDIFF_TYPE__. */ - -#ifndef PTRDIFF_TYPE -#define PTRDIFF_TYPE "long int" -#endif - -/* The string value for __WCHAR_TYPE__. */ - -#ifndef WCHAR_TYPE -#define WCHAR_TYPE "int" -#endif - -/* The string value for __WINT_TYPE__. */ - -#ifndef WINT_TYPE -#define WINT_TYPE "unsigned int" -#endif - /* The string value for __USER_LABEL_PREFIX__ */ #ifndef USER_LABEL_PREFIX diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 7042cd27988..57fa4c0fa1b 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -662,18 +662,6 @@ static const struct builtin builtin_array[] = X("__USER_LABEL_PREFIX__", ULP), C("__REGISTER_PREFIX__", REGISTER_PREFIX), C("__HAVE_BUILTIN_SETJMP__", "1"), -#ifndef NO_BUILTIN_SIZE_TYPE - C("__SIZE_TYPE__", SIZE_TYPE), -#endif -#ifndef NO_BUILTIN_PTRDIFF_TYPE - C("__PTRDIFF_TYPE__", PTRDIFF_TYPE), -#endif -#ifndef NO_BUILTIN_WCHAR_TYPE - C("__WCHAR_TYPE__", WCHAR_TYPE), -#endif -#ifndef NO_BUILTIN_WINT_TYPE - C("__WINT_TYPE__", WINT_TYPE), -#endif #ifdef STDC_0_IN_SYSTEM_HEADERS B("__STDC__", BT_STDC), #else diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 36ccaebcd35..8d4e92522c5 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -177,46 +177,6 @@ This macro is just like @code{CPP_SPEC}, but is used for C++, rather than C@. If you do not define this macro, then the value of @code{CPP_SPEC} (if any) will be used instead. -@findex NO_BUILTIN_SIZE_TYPE -@item NO_BUILTIN_SIZE_TYPE -If this macro is defined, the preprocessor will not define the built-in macro -@code{__SIZE_TYPE__}. The macro @code{__SIZE_TYPE__} must then be defined -by @code{CPP_SPEC} instead. - -This should be defined if @code{SIZE_TYPE} depends on target dependent flags -which are not accessible to the preprocessor. Otherwise, it should not -be defined. - -@findex NO_BUILTIN_PTRDIFF_TYPE -@item NO_BUILTIN_PTRDIFF_TYPE -If this macro is defined, the preprocessor will not define the built-in macro -@code{__PTRDIFF_TYPE__}. The macro @code{__PTRDIFF_TYPE__} must then be -defined by @code{CPP_SPEC} instead. - -This should be defined if @code{PTRDIFF_TYPE} depends on target dependent flags -which are not accessible to the preprocessor. Otherwise, it should not -be defined. - -@findex NO_BUILTIN_WCHAR_TYPE -@item NO_BUILTIN_WCHAR_TYPE -If this macro is defined, the preprocessor will not define the built-in macro -@code{__WCHAR_TYPE__}. The macro @code{__WCHAR_TYPE__} must then be -defined by @code{CPP_SPEC} instead. - -This should be defined if @code{WCHAR_TYPE} depends on target dependent flags -which are not accessible to the preprocessor. Otherwise, it should not -be defined. - -@findex NO_BUILTIN_WINT_TYPE -@item NO_BUILTIN_WINT_TYPE -If this macro is defined, the preprocessor will not define the built-in macro -@code{__WINT_TYPE__}. The macro @code{__WINT_TYPE__} must then be -defined by @code{CPP_SPEC} instead. - -This should be defined if @code{WINT_TYPE} depends on target dependent flags -which are not accessible to the preprocessor. Otherwise, it should not -be defined. - @findex CC1_SPEC @item CC1_SPEC A C string constant that tells the GCC driver program options to diff --git a/gcc/gcc.c b/gcc/gcc.c index b9672721efa..0b8e36365e5 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -684,7 +684,6 @@ static const char *cpp_unique_options = %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\ %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\ %{fno-inline|O0|!O*:-D__NO_INLINE__} %{ffast-math:-D__FAST_MATH__}\ - %{fshort-wchar:-U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\\ unsigned\\ int}\ %{ffreestanding:-D__STDC_HOSTED__=0} %{fno-hosted:-D__STDC_HOSTED__=0}\ %{!ffreestanding:%{!fno-hosted:-D__STDC_HOSTED__=1}} %{remap}\ %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\ diff --git a/gcc/system.h b/gcc/system.h index e12585b3fb0..0a4c0c6b203 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -607,7 +607,8 @@ typedef char _Bool; LONGJMP_RESTORE_FROM_STACK MAX_INT_TYPE_SIZE ASM_IDENTIFY_GCC \ STDC_VALUE TRAMPOLINE_ALIGN ASM_IDENTIFY_GCC_AFTER_SOURCE \ SLOW_ZERO_EXTEND SUBREG_REGNO_OFFSET DWARF_LINE_MIN_INSTR_LENGTH \ - TRADITIONAL_RETURN_FLOAT + TRADITIONAL_RETURN_FLOAT NO_BUILTIN_SIZE_TYPE \ + NO_BUILTIN_PTRDIFF_TYPE NO_BUILTIN_WCHAR_TYPE NO_BUILTIN_WINT_TYPE #endif /* IN_GCC */ diff --git a/gcc/tradcpp.c b/gcc/tradcpp.c index 203b8cc7b39..9caf45e6bc0 100644 --- a/gcc/tradcpp.c +++ b/gcc/tradcpp.c @@ -5149,18 +5149,6 @@ initialize_builtins () install_spec ("__INCLUDE_LEVEL__", T_INCLUDE_LEVEL); install_spec ("__LINE__", T_SPECLINE); -#ifndef NO_BUILTIN_SIZE_TYPE - install_value ("__SIZE_TYPE__", SIZE_TYPE); -#endif -#ifndef NO_BUILTIN_PTRDIFF_TYPE - install_value ("__PTRDIFF_TYPE__", PTRDIFF_TYPE); -#endif -#ifndef NO_BUILTIN_WCHAR_TYPE - install_value ("__WCHAR_TYPE__", WCHAR_TYPE); -#endif -#ifndef NO_BUILTIN_WINT_TYPE - install_value ("__WINT_TYPE__", WINT_TYPE); -#endif install_value ("__REGISTER_PREFIX__", REGISTER_PREFIX); install_value ("__USER_LABEL_PREFIX__", user_label_prefix); |