aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-05-07 21:07:24 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-05-07 21:07:24 +0000
commit44a147ad2ee5436c0f2b1bb95e3de61cce8c226e (patch)
tree74df1638e099a3467f9206ea84d1ec4945ea2b23 /gcc/cppinit.c
parent522e3d222659a0f3ea3d0ffc1e72b35feafed01e (diff)
downloadgcc-44a147ad2ee5436c0f2b1bb95e3de61cce8c226e.zip
gcc-44a147ad2ee5436c0f2b1bb95e3de61cce8c226e.tar.gz
gcc-44a147ad2ee5436c0f2b1bb95e3de61cce8c226e.tar.bz2
c-common.c (c_common_init): Set options->unsigned_wchar.
* c-common.c (c_common_init): Set options->unsigned_wchar. * cppinit.c (cpp_create_reader): Default unsigned_wchar, group target dependencies. (init_builtins, cpp_handle_option): Update. * cpplex.c (cpp_interpret_charconst): Update. * cpplib.h (struct cpp_options): Add unsigned_wchar, rename signed_char to unsigned_char, group target dependencies. * defaults.h (WCHAR_UNSIGNED): Remove. * system.h (WCHAR_UNSIGNED, MAX_CHAR_TYPE_SIZE): Poison. config: * freebsd.h, interix.h, alpha/freebsd.h, arm/freebsd.h, i386/386bsd.h, i386/beos-elf.h, i386/bsd386.h, i386/cygwin.h, i386/djgpp.h, i386/freebsd-aout.h, i386/i386-interix.h, i386/win32.h, ia64/freebsd.h, mips/netbsd.h, rs6000/freebsd.h, sh/elf.h, sh/sh.h, sparc/freebsd.h: Remove WCHAR_UNSIGNED. doc: * tm.texi: Remove MAX_CHAR_TYPE_SIZE. From-SVN: r53271
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 1d570b0..dae4ffe 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -494,11 +494,6 @@ cpp_create_reader (lang)
CPP_OPTION (pfile, tabstop) = 8;
CPP_OPTION (pfile, operator_names) = 1;
CPP_OPTION (pfile, warn_endif_labels) = 1;
-#if DEFAULT_SIGNED_CHAR
- CPP_OPTION (pfile, signed_char) = 1;
-#else
- CPP_OPTION (pfile, signed_char) = 0;
-#endif
CPP_OPTION (pfile, pending) =
(struct cpp_pending *) xcalloc (1, sizeof (struct cpp_pending));
@@ -510,6 +505,8 @@ cpp_create_reader (lang)
CPP_OPTION (pfile, char_precision) = CHAR_BIT;
CPP_OPTION (pfile, wchar_precision) = CHAR_BIT * sizeof (int);
CPP_OPTION (pfile, int_precision) = CHAR_BIT * sizeof (int);
+ CPP_OPTION (pfile, unsigned_char) = !DEFAULT_SIGNED_CHAR;
+ CPP_OPTION (pfile, unsigned_wchar) = 1;
/* It's simplest to just create this struct whether or not it will
be needed. */
@@ -779,7 +776,7 @@ init_builtins (pfile)
else if (CPP_OPTION (pfile, c99))
_cpp_define_builtin (pfile, "__STDC_VERSION__ 199901L");
- if (CPP_OPTION (pfile, signed_char) == 0)
+ if (CPP_OPTION (pfile, unsigned_char))
_cpp_define_builtin (pfile, "__CHAR_UNSIGNED__ 1");
if (CPP_OPTION (pfile, lang) == CLK_STDC89
@@ -1450,10 +1447,10 @@ cpp_handle_option (pfile, argc, argv, ignore)
CPP_OPTION (pfile, show_column) = 0;
break;
case OPT_fsigned_char:
- CPP_OPTION (pfile, signed_char) = 1;
+ CPP_OPTION (pfile, unsigned_char) = 0;
break;
case OPT_funsigned_char:
- CPP_OPTION (pfile, signed_char) = 0;
+ CPP_OPTION (pfile, unsigned_char) = 1;
break;
case OPT_ftabstop:
/* Silently ignore empty string, non-longs and silly values. */