aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2002-05-21 21:55:37 +0000
committerZack Weinberg <zack@gcc.gnu.org>2002-05-21 21:55:37 +0000
commit2a1dc0d87ed40633451c634b567a37f15e93abb5 (patch)
treea9277c30531397fe1a8be45a591e60dad0e34257 /gcc/c-common.c
parentd476dcad7f5d7b4c0a03d5a053e713c6b1b3a528 (diff)
downloadgcc-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/c-common.c')
-rw-r--r--gcc/c-common.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index b9658da..89f9870 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -4372,6 +4372,12 @@ cb_register_builtins (pfile)
if (flag_no_inline)
cpp_define (pfile, "__NO_INLINE__");
+ if (flag_iso)
+ cpp_define (pfile, "__STRICT_ANSI__");
+
+ if (!flag_signed_char)
+ cpp_define (pfile, "__CHAR_UNSIGNED__");
+
/* A straightforward target hook doesn't work, because of problems
linking that hook's body when part of non-C front ends. */
#define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM)
@@ -4461,15 +4467,7 @@ c_common_init (filename)
options->int_precision = TYPE_PRECISION (integer_type_node);
options->wchar_precision = TYPE_PRECISION (wchar_type_node);
options->unsigned_wchar = TREE_UNSIGNED (wchar_type_node);
- /* This can be uncommented when 1) This all happens before
- cpp_post_options() (needed for __CHAR_UNSIGNED__ builtin), which
- in turn requires wchat_type_node to be set up properly by then,
- and 2) tradcpp is integrated, so that the preprocessors don't
- need to handle the command-line options and the specs in gcc.c
- can be updated.
-
- options->unsigned_char = !flag_signed_char; */
-
+ options->unsigned_char = !flag_signed_char;
options->warn_multichar = warn_multichar;
options->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS;