OSDN Git Service

* config/mips/mips.h (CPP_SPEC): Simplify .s/.S handling.
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Jun 2001 11:52:56 +0000 (11:52 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Jun 2001 11:52:56 +0000 (11:52 +0000)
Don't define _LANGUAGE_C and variants for .cpp/.cp/.c++ files.
Move definition of _LANGUAGE_C_PLUS_PLUS ...
(CPLUSPLUS_CPP_SPEC): ... here.
Fixes PRs c++/3047, target/441.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43007 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mips/mips.h

index ca8bb06..303680d 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * config/mips/mips.h (CPP_SPEC): Simplify .s/.S handling.
+       Don't define _LANGUAGE_C and variants for .cpp/.cp/.c++ files.
+       Move definition of _LANGUAGE_C_PLUS_PLUS ...
+       (CPLUSPLUS_CPP_SPEC): ... here.
+       Fixes PRs c++/3047, target/441.
+
 2001-06-08  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
 
        * doc/install.texi2html (MAKEINFO): Keep value if set already.
index 77bc6fd..8375bbf 100644 (file)
@@ -958,17 +958,19 @@ while (0)
 #endif
 #endif
 
+/* For C++ we need to ensure that _LANGUAGE_C_PLUS_PLUS is defined independent
+   of the source file extension.  */
+#define CPLUSPLUS_CPP_SPEC "\
+-D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS \
+%(cpp) \
+"
 /* CPP_SPEC is the set of arguments to pass to the preprocessor.  */
 
 #ifndef CPP_SPEC
 #define CPP_SPEC "\
-%{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
-%{.cxx:        -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
-%{.C:  -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \
 %{.m:  -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C -D__LANGUAGE_C -D_LANGUAGE_C} \
-%{.S:  -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
-%{.s:  -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
-%{!.S: %{!.s: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}} \
+%{.S|.s: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
+%{!.S: %{!.s: %{!.cc: %{!.cxx: %{!.cpp: %{!.cp: %{!.c++: %{!.C: %{!.m: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}}}}} \
 %(subtarget_cpp_size_spec) \
 %{mips3:-U__mips -D__mips=3 -D__mips64} \
 %{mips4:-U__mips -D__mips=4 -D__mips64} \