diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2002-05-21 21:55:37 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2002-05-21 21:55:37 +0000 |
commit | 2a1dc0d87ed40633451c634b567a37f15e93abb5 (patch) | |
tree | a9277c30531397fe1a8be45a591e60dad0e34257 /gcc/cppinit.c | |
parent | d476dcad7f5d7b4c0a03d5a053e713c6b1b3a528 (diff) | |
download | gcc-2a1dc0d87ed40633451c634b567a37f15e93abb5.zip gcc-2a1dc0d87ed40633451c634b567a37f15e93abb5.tar.gz gcc-2a1dc0d87ed40633451c634b567a37f15e93abb5.tar.bz2 |
c-common.c (c_common_init): Set options->unsigned_char from flag_signed_char.
* c-common.c (c_common_init): Set options->unsigned_char from
flag_signed_char.
(cb_register_builtins): Define __STRICT_ANSI__ and
__CHAR_UNSIGNED__ here...
* cppinit.c (init_builtins): Not here.
(cpp_create_reader): unsigned_char option defaults to 0, not
!DEFAULT_SIGNED_CHAR.
(COMMAND_LINE_OPTIONS, cpp_handle_option): Lose -fsigned-char
and -funsigned-char.
* cpphash.h (struct spec_nodes): Kill n__STRICT_ANSI__.
* cpphash.c (_cpp_init_hashtable): Don't set it.
* cppmacro.c (builtin_macro) [BT_STDC]: Use the language setting
directly. Clarify comment.
From-SVN: r53703
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 4f2cc8e..f8e9cd5 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -500,7 +500,7 @@ 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_char) = 0; CPP_OPTION (pfile, unsigned_wchar) = 1; /* It's simplest to just create this struct whether or not it will @@ -694,25 +694,16 @@ init_builtins (pfile) if (CPP_OPTION (pfile, cplusplus)) _cpp_define_builtin (pfile, "__cplusplus 1"); - - if (CPP_OPTION (pfile, objc)) + else if (CPP_OPTION (pfile, objc)) _cpp_define_builtin (pfile, "__OBJC__ 1"); + else if (CPP_OPTION (pfile, lang) == CLK_ASM) + _cpp_define_builtin (pfile, "__ASSEMBLER__ 1"); if (CPP_OPTION (pfile, lang) == CLK_STDC94) _cpp_define_builtin (pfile, "__STDC_VERSION__ 199409L"); else if (CPP_OPTION (pfile, c99)) _cpp_define_builtin (pfile, "__STDC_VERSION__ 199901L"); - if (CPP_OPTION (pfile, unsigned_char)) - _cpp_define_builtin (pfile, "__CHAR_UNSIGNED__ 1"); - - if (CPP_OPTION (pfile, lang) == CLK_STDC89 - || CPP_OPTION (pfile, lang) == CLK_STDC94 - || CPP_OPTION (pfile, lang) == CLK_STDC99) - _cpp_define_builtin (pfile, "__STRICT_ANSI__ 1"); - else if (CPP_OPTION (pfile, lang) == CLK_ASM) - _cpp_define_builtin (pfile, "__ASSEMBLER__ 1"); - if (pfile->cb.register_builtins) (*pfile->cb.register_builtins) (pfile); } @@ -1158,9 +1149,7 @@ new_pending_directive (pend, text, handler) DEF_OPT("fno-show-column", 0, OPT_fno_show_column) \ DEF_OPT("fpreprocessed", 0, OPT_fpreprocessed) \ DEF_OPT("fshow-column", 0, OPT_fshow_column) \ - DEF_OPT("fsigned-char", 0, OPT_fsigned_char) \ DEF_OPT("ftabstop=", no_num, OPT_ftabstop) \ - DEF_OPT("funsigned-char", 0, OPT_funsigned_char) \ DEF_OPT("h", 0, OPT_h) \ DEF_OPT("idirafter", no_dir, OPT_idirafter) \ DEF_OPT("imacros", no_fil, OPT_imacros) \ @@ -1365,12 +1354,6 @@ cpp_handle_option (pfile, argc, argv, ignore) case OPT_fno_show_column: CPP_OPTION (pfile, show_column) = 0; break; - case OPT_fsigned_char: - CPP_OPTION (pfile, unsigned_char) = 0; - break; - case OPT_funsigned_char: - CPP_OPTION (pfile, unsigned_char) = 1; - break; case OPT_ftabstop: /* Silently ignore empty string, non-longs and silly values. */ if (arg[0] != '\0') |