aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i960
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-02-02 18:56:37 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-02-02 18:56:37 +0000
commit0fef3fd0eada944c2677ba0680393a12979f970f (patch)
tree955327bc9f9ac1f86814b649a8e7be4427abe84a /gcc/config/i960
parent1acce4c771ff585069a1551fe1a6d0bf70fdda52 (diff)
downloadgcc-0fef3fd0eada944c2677ba0680393a12979f970f.zip
gcc-0fef3fd0eada944c2677ba0680393a12979f970f.tar.gz
gcc-0fef3fd0eada944c2677ba0680393a12979f970f.tar.bz2
cpphash.h (struct spec_nodes): Remove n__CHAR_UNSIGNED__.
* cpphash.h (struct spec_nodes): Remove n__CHAR_UNSIGNED__. * cpphash.c (_cpp_init_hashtable): Similarly. * cppinit.c (cpp_create_reader): Default the signed_char flag. (init_builtins): Define __CHAR_UNSIGNED__ appropriately. (COMMAND_LINE_OPTIONS): Recognise -f{un,}signed-char. (cpp_handle_option): Handle the new options. * cpplex.c (cpp_interpret_charconst): Use new flag. * cpplib.h (struct cpp_options): New member signed_char. * gcc.c (cpp_unique_options): Remove %c spec and documentation. (cpp_options): Handle -fsigned-char and -funsigned-char. (static_specs): Remove signed_char_spec. (do_spec1): Don't handle %c. * system.h: Poison SIGNED_CHAR_SPEC. * tradcif.y (yylex): Use flag_signed_char. * tradcpp.h (flag_signed_char): New. * tradcpp.c (flag_signed_char): New. (main): Handle new command-line options. (initialize_builtins): Define __CHAR_UNSIGNED__ if appropriate. config: * alpha/alpha.h (SIGNED_CHAR_SPEC): Remove. * avr/avr.h: Remove old comments. * i960/i960.h (CPP_SPEC): Pass -fsigned-char if -mic*. (CC1_SPEC): Pass -fsigned-char if -mic*. (SIGNED_CHAR_SPEC): Remove. doc: * tm.texi (SIGNED_CHAR_SPEC): Remove documentation. testsuite: * gcc.dg/cpp/uchar-1.c, uchar-2.c, uchar-3.c: New tests. From-SVN: r49444
Diffstat (limited to 'gcc/config/i960')
-rw-r--r--gcc/config/i960/i960.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/gcc/config/i960/i960.h b/gcc/config/i960/i960.h
index ec4b9d1..4df5a6f 100644
--- a/gcc/config/i960/i960.h
+++ b/gcc/config/i960/i960.h
@@ -30,8 +30,9 @@ Boston, MA 02111-1307, USA. */
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-Di960 -Di80960 -DI960 -DI80960 -Acpu=i960 -Amachine=i960"
-/* Name to predefine in the preprocessor for processor variations. */
-#define CPP_SPEC "%{mic*:-D__i960\
+/* Name to predefine in the preprocessor for processor variations.
+ -mic* options make characters signed by default. */
+#define CPP_SPEC "%{mic*:-D__i960 -fsigned-char\
%{mka:-D__i960KA}%{mkb:-D__i960KB}\
%{mja:-D__i960JA}%{mjd:-D__i960JD}%{mjf:-D__i960JF}\
%{mrp:-D__i960RP}\
@@ -52,20 +53,13 @@ Boston, MA 02111-1307, USA. */
%{!mcc:%{!mcf:-D__i960_KB -D__i960KB__ %{mic*:-D__i960KB}}}}}}}}}\
%{mlong-double-64:-D__LONG_DOUBLE_64__}"
-/* -mic* options make characters signed by default. */
-/* Use #if rather than ?: because MIPS C compiler rejects ?: in
- initializers. */
-#if DEFAULT_SIGNED_CHAR
-#define SIGNED_CHAR_SPEC "%{funsigned-char:-D__CHAR_UNSIGNED__}"
-#else
-#define SIGNED_CHAR_SPEC "%{!fsigned-char:%{!mic*:-D__CHAR_UNSIGNED__}}"
-#endif
-
/* Specs for the compiler, to handle processor variations.
If the user gives an explicit -gstabs or -gcoff option, then do not
- try to add an implicit one, as this will fail. */
+ try to add an implicit one, as this will fail.
+ -mic* options make characters signed by default. */
#define CC1_SPEC \
- "%{!mka:%{!mkb:%{!msa:%{!msb:%{!mmc:%{!mca:%{!mcc:%{!mcf:%{!mja:%{!mjd:%{!mjf:%{!mrp:-mka}}}}}}}}}}}}\
+ "%{mic*:-fsigned-char}\
+%{!mka:%{!mkb:%{!msa:%{!msb:%{!mmc:%{!mca:%{!mcc:%{!mcf:%{!mja:%{!mjd:%{!mjf:%{!mrp:-mka}}}}}}}}}}}}\
%{!gs*:%{!gc*:%{mbout:%{g*:-gstabs}}\
%{mcoff:%{g*:-gcoff}}\
%{!mbout:%{!mcoff:%{g*:-gstabs}}}}}"