From 887af1f27162af9049b5ab979bfd34e1b4bc119f Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Mon, 11 Jun 2001 14:48:11 +0000 Subject: [PATCH] alpha.h (CPP_SPEC): Don't define __LANGUAGE_C and variants for .cpp/.cp/.c++ files. * 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. From-SVN: r43190 --- gcc/ChangeLog | 7 +++++++ gcc/config/alpha/alpha.h | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5f480ff643b..a950d42035a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-06-11 Rainer Orth + + * 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 * jump.c (duplicate_loop_exit_test): Fix loop header heuristics. diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index badeaffc326..148a6cffaeb 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -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)" -- 2.30.2