This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for -std=c89 / -Di386
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: Patch for -std=c89 / -Di386
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Wed, 10 Jan 2001 17:19:29 +0000 (GMT)
This patch fixes the specific bug I reported in c/545 (-std=c89,
-std=c99 still define i386), though not the general issue of many
similar problems in specs.
(On the whole, I'd rather lose all these macros in the user namespace
unconditionally (including such macros as "unix" and "linux", as well
as the architecture ones).)
Bootstrapped with no regressions on i686-pc-linux-gnu. OK to commit?
2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
* i386.h (CPP_CPU_SPEC): Allow for -std=c* and -std=i* as
equivalent to -ansi in disabling -Di386.
--- i386.h.orig Mon Jan 8 18:16:21 2001
+++ i386.h Wed Jan 10 12:20:23 2001
@@ -411,7 +411,7 @@ extern int ix86_arch;
#ifndef CPP_CPU_SPEC
#define CPP_CPU_SPEC "\
-Acpu=i386 -Amachine=i386 \
-%{!ansi:-Di386} -D__i386 -D__i386__ \
+%{!ansi:%{!std=c*:%{!std=i*:-Di386}}} -D__i386 -D__i386__ \
%{march=i386:%{!mcpu*:-D__tune_i386__ }}\
%{march=i486:-D__i486 -D__i486__ %{!mcpu*:-D__tune_i486__ }}\
%{march=pentium|march=i586:-D__i586 -D__i586__ -D__pentium -D__pentium__ \
--
Joseph S. Myers
jsm28@cam.ac.uk