tm.texi: Document new target switch, NO_BUILTIN_WCHAR_TYPE.
* tm.texi: Document new target switch, NO_BUILTIN_WCHAR_TYPE. * cppinit.c (builtin_array): Define __WCHAR_TYPE__ only if NO_BUILTIN_WCHAR_TYPE is not defined. (CPP_WCHAR_TYPE): Delete. * cccp.c (main): Don't change wchar_type if cplusplus. (special_symbol, initialize_builtins): Honor NO_BUILTIN_WCHAR_TYPE. From-SVN: r32241
This commit is contained in:
parent
7cb4ce1205
commit
0209c3409d
|
@ -1,3 +1,12 @@
|
|||
2000-02-28 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* tm.texi: Document new target switch, NO_BUILTIN_WCHAR_TYPE.
|
||||
* cppinit.c (builtin_array): Define __WCHAR_TYPE__ only if
|
||||
NO_BUILTIN_WCHAR_TYPE is not defined.
|
||||
(CPP_WCHAR_TYPE): Delete.
|
||||
* cccp.c (main): Don't change wchar_type if cplusplus.
|
||||
(special_symbol, initialize_builtins): Honor NO_BUILTIN_WCHAR_TYPE.
|
||||
|
||||
2000-02-28 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* config/arm/arm-wince-pe.h (SIZE_TYPE): Define to "unsigned long".
|
||||
|
|
11
gcc/cccp.c
11
gcc/cccp.c
|
@ -1786,11 +1786,6 @@ main (argc, argv)
|
|||
fp->nominal_fname_len = strlen (in_fname);
|
||||
fp->lineno = 0;
|
||||
|
||||
/* In C++, wchar_t is a distinct basic type, and we can expect
|
||||
__wchar_t to be defined by cc1plus. */
|
||||
if (cplusplus)
|
||||
wchar_type = "__wchar_t";
|
||||
|
||||
/* Install __LINE__, etc. Must follow initialize_char_syntax
|
||||
and option processing. */
|
||||
initialize_builtins (fp, &outbuf);
|
||||
|
@ -4273,9 +4268,11 @@ special_symbol (hp, op)
|
|||
break;
|
||||
#endif
|
||||
|
||||
#ifndef NO_BUILTIN_WCHAR_TYPE
|
||||
case T_WCHAR_TYPE:
|
||||
buf = wchar_type;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case T_USER_LABEL_PREFIX_TYPE:
|
||||
buf = user_label_prefix;
|
||||
|
@ -10298,7 +10295,9 @@ initialize_builtins (inp, outp)
|
|||
#ifndef NO_BUILTIN_PTRDIFF_TYPE
|
||||
install ((const U_CHAR *) "__PTRDIFF_TYPE__ ", -1, T_PTRDIFF_TYPE, NULL_PTR, -1);
|
||||
#endif
|
||||
#ifndef NO_BUILTIN_WCHAR_TYPE
|
||||
install ((const U_CHAR *) "__WCHAR_TYPE__", -1, T_WCHAR_TYPE, NULL_PTR, -1);
|
||||
#endif
|
||||
install ((const U_CHAR *) "__USER_LABEL_PREFIX__", -1, T_USER_LABEL_PREFIX_TYPE,
|
||||
NULL_PTR, -1);
|
||||
install ((const U_CHAR *) "__REGISTER_PREFIX__", -1, T_REGISTER_PREFIX_TYPE,
|
||||
|
@ -10347,10 +10346,12 @@ initialize_builtins (inp, outp)
|
|||
outp, dp);
|
||||
#endif
|
||||
|
||||
#ifndef NO_BUILTIN_WCHAR_TYPE
|
||||
sprintf (directive, " __WCHAR_TYPE__ %s\n", wchar_type);
|
||||
output_line_directive (inp, outp, 0, same_file);
|
||||
pass_thru_directive (udirective, &udirective[strlen (directive)],
|
||||
outp, dp);
|
||||
#endif
|
||||
|
||||
sprintf (directive, " __DATE__ \"%s %2d %4d\"\n",
|
||||
monthnames[timebuf->tm_mon],
|
||||
|
|
|
@ -63,8 +63,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||
#ifndef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
#endif
|
||||
#define CPP_WCHAR_TYPE(PFILE) \
|
||||
(CPP_OPTIONS (PFILE)->cplusplus ? "__wchar_t" : WCHAR_TYPE)
|
||||
|
||||
/* The string value for __USER_LABEL_PREFIX__ */
|
||||
|
||||
|
@ -530,7 +528,9 @@ static const struct builtin builtin_array[] =
|
|||
#ifndef NO_BUILTIN_PTRDIFF_TYPE
|
||||
{ "__PTRDIFF_TYPE__", PTRDIFF_TYPE, T_CONST, DUMP },
|
||||
#endif
|
||||
#ifndef NO_BUILTIN_WCHAR_TYPE
|
||||
{ "__WCHAR_TYPE__", WCHAR_TYPE, T_CONST, DUMP },
|
||||
#endif
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
|
10
gcc/tm.texi
10
gcc/tm.texi
|
@ -128,6 +128,16 @@ 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 builtin 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 SIGNED_CHAR_SPEC
|
||||
@item SIGNED_CHAR_SPEC
|
||||
A C string constant that tells the GCC driver program options to
|
||||
|
|
Loading…
Reference in New Issue