diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1999-09-23 21:03:53 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-09-23 17:03:53 -0400 |
commit | 12a39b12648fdd1675757518450720d16ef24793 (patch) | |
tree | f1348bbe949f8cba90abd610eefdbe630bdaa2c1 /gcc/c-lex.c | |
parent | e689ae67255aca55fddb4b01b0b9ded6d3f151ea (diff) | |
download | gcc-12a39b12648fdd1675757518450720d16ef24793.zip gcc-12a39b12648fdd1675757518450720d16ef24793.tar.gz gcc-12a39b12648fdd1675757518450720d16ef24793.tar.bz2 |
toplev.c (documented_lang_options): Add -fshort-wchar.
* toplev.c (documented_lang_options): Add -fshort-wchar.
* c-decl.c (c_decode_option): Likewise.
(init_decl_processing): If -fshort-wchar, use 'short unsigned int'
for wchar_t.
* c-common.c, c-lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
* gcc.c (default_compilers): If -fshort-wchar,
override __WCHAR_TYPE__.
* tm.texi (C Dialect Options): Add -fshort-wchar.
From-SVN: r29638
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index bd171ab..55f9acb 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -135,13 +135,8 @@ extern int yydebug; /* File used for outputting assembler code. */ extern FILE *asm_out_file; -#ifndef WCHAR_TYPE_SIZE -#ifdef INT_TYPE_SIZE -#define WCHAR_TYPE_SIZE INT_TYPE_SIZE -#else -#define WCHAR_TYPE_SIZE BITS_PER_WORD -#endif -#endif +#undef WCHAR_TYPE_SIZE +#define WCHAR_TYPE_SIZE TYPE_PRECISION (wchar_type_node) /* Number of bytes in a wide character. */ #define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT) |