diff options
author | Jason Merrill <merrill@gnu.org> | 1994-04-04 21:21:02 +0000 |
---|---|---|
committer | Jason Merrill <merrill@gnu.org> | 1994-04-04 21:21:02 +0000 |
commit | f98e603e09daa98f71247d484ccf747031c2ab89 (patch) | |
tree | 588ec16773d35c6eee82aae0e152590b7ffbe9f5 | |
parent | 4563275aa69c581ed14801e31603407db1a18d0e (diff) | |
download | gcc-f98e603e09daa98f71247d484ccf747031c2ab89.zip gcc-f98e603e09daa98f71247d484ccf747031c2ab89.tar.gz gcc-f98e603e09daa98f71247d484ccf747031c2ab89.tar.bz2 |
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
-rw-r--r-- | gcc/cccp.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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: |