OSDN Git Service

* config/alpha/alpha.h (CPP_SPEC): Don't define __LANGUAGE_C and
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jun 2001 14:48:11 +0000 (14:48 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jun 2001 14:48:11 +0000 (14:48 +0000)
variants for .cpp/.cp/.c++ files.
Move definition of __LANGUAGE_C_PLUS_PLUS ...
(CPLUSPLUS_CPP_SPEC): ... here.

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

gcc/ChangeLog
gcc/config/alpha/alpha.h

index 5f480ff..a950d42 100644 (file)
@@ -1,3 +1,10 @@
+2001-06-11  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * config/alpha/alpha.h (CPP_SPEC): Don't define __LANGUAGE_C and
+       variants for .cpp/.cp/.c++ files. 
+       Move definition of __LANGUAGE_C_PLUS_PLUS ...
+       (CPLUSPLUS_CPP_SPEC): ... here.
+
 Mon Jun 11 15:47:45 CEST 2001  Jan Hubicka  <jh@suse.cz>
 
        * jump.c (duplicate_loop_exit_test): Fix loop header heuristics.
index badeaff..148a6cf 100644 (file)
@@ -21,14 +21,20 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
 
+/* 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 -D__cplusplus \
+%(cpp) \
+"
+
 /* Write out the correct language type definition for the header files.  
    Unless we have assembler language, write out the symbols for C.  */
 #define CPP_SPEC "\
 %{!undef:\
 %{.S:-D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY }}\
-%{.cc|.cxx|.C:-D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus }\
 %{.m:-D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C }\
-%{!.S:%{!.cc:%{!.cxx:%{!.C:%{!.m:-D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C }}}}}}\
+%{!.S:%{!.cc:%{!.cxx:%{!.cpp:%{!.cp:%{!.c++:%{!.C:%{!.m:-D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C }}}}}}}}}\
 %{mieee:-D_IEEE_FP }\
 %{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT }}\
 %(cpp_cpu) %(cpp_subtarget)"