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/cppmacro.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/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index c7a08f2..797a304 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -174,14 +174,17 @@ builtin_macro (pfile, node) /* __STDC__ has the value 1 under normal circumstances. However, if (a) we are in a system header, (b) the option - stdc_0_in_system_headers is true, and (c) __STRICT_ANSI__ is - not defined, then it has the value 0. */ + stdc_0_in_system_headers is true (set by target config), and + (c) we are not in strictly conforming mode, then it has the + value 0. */ case BT_STDC: { int stdc; + enum c_lang lang = CPP_OPTION (pfile, lang); if (CPP_IN_SYSTEM_HEADER (pfile) && CPP_OPTION (pfile, stdc_0_in_system_headers) - && pfile->spec_nodes.n__STRICT_ANSI__->type == NT_VOID) + && !(lang == CLK_STDC89 || lang == CLK_STDC94 + || lang == CLK_STDC99)) /* || lang == CLK_CXX98 ? */ stdc = 0; else stdc = 1; |