diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-21 21:55:37 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-21 21:55:37 +0000 |
commit | 965e9876e513b1c221ba6f74ba40b8ccde9456ed (patch) | |
tree | a9277c30531397fe1a8be45a591e60dad0e34257 /gcc/cppmacro.c | |
parent | 8a50a6399767b8da0b7774adbd5ff4ea843bee85 (diff) | |
download | ppe42-gcc-965e9876e513b1c221ba6f74ba40b8ccde9456ed.tar.gz ppe42-gcc-965e9876e513b1c221ba6f74ba40b8ccde9456ed.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53703 138bc75d-0d04-0410-961f-82ee72b054a4
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 c7a08f26243..797a30428f8 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; |