From: Jason Merrill Date: Mon, 4 Apr 1994 21:21:02 +0000 (+0000) Subject: cccp.c (special_symbol, [...]): Output "__wchar_t" for C++. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f98e603e09daa98f71247d484ccf747031c2ab89;p=gcc.git cccp.c (special_symbol, [...]): Output "__wchar_t" for C++. * cccp.c (special_symbol, case T_WCHAR_TYPE): Output "__wchar_t" for C++. From-SVN: r6959 --- diff --git a/gcc/cccp.c b/gcc/cccp.c index 5f73a0afe0a..1901cf6059c 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -3820,8 +3820,15 @@ special_symbol (hp, op) #endif case T_WCHAR_TYPE: - buf = (char *) alloca (3 + strlen (WCHAR_TYPE)); - sprintf (buf, "%s", WCHAR_TYPE); + /* In C++, wchar_t is a distinct basic type, and we can expect + __wchar_t to be defined by cc1plus. */ + if (cplusplus) + buf = "__wchar_t"; + else + { + buf = (char *) alloca (3 + strlen (WCHAR_TYPE)); + sprintf (buf, "%s", WCHAR_TYPE); + } break; case T_USER_LABEL_PREFIX_TYPE: