diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 718067e6941..a8f4e3367f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2003-07-01 Neil Booth + + * config/sol2.h, config/alpha/alpha.h, config/alpha/linux.h, + config/i386/i386-interix.h, config/ia64/hpux.h, config/mips/iris6.h, + config/mips/linux.h, config/mips/mips.h, config/pa/pa-hpux.h, + config/pa/pa-hpux10.h, config/pa/pa-hpux11.h, config/pa/pa-pro-end.h, + config/pa/pa.h, config/pa/rtems.h: Use c_dialect_ macros. + 2003-07-01 Andreas Jaeger * final.c: Convert prototypes to ISO C90. diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index b9bc40fa600..3a81b08f66f 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -78,14 +78,14 @@ Boston, MA 02111-1307, USA. */ { \ if (preprocessing_asm_p ()) \ builtin_define_std ("LANGUAGE_ASSEMBLY"); \ - else if (c_language == clk_c) \ - builtin_define_std ("LANGUAGE_C"); \ - else if (c_language == clk_cplusplus) \ + else if (c_dialect_cxx ()) \ { \ builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \ builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \ } \ - if (flag_objc) \ + else \ + builtin_define_std ("LANGUAGE_C"); \ + if (c_dialect_objc ()) \ { \ builtin_define ("__LANGUAGE_OBJECTIVE_C"); \ builtin_define ("__LANGUAGE_OBJECTIVE_C__"); \ diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h index feca60f19cc..bad20a6b204 100644 --- a/gcc/config/alpha/linux.h +++ b/gcc/config/alpha/linux.h @@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */ builtin_define_std ("unix"); \ builtin_assert ("system=linux"); \ /* The GNU C++ standard library requires this. */ \ - if (c_language == clk_cplusplus) \ + if (c_dialect_cxx ()) \ builtin_define ("_GNU_SOURCE"); \ } while (0) diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h index 4d5e202c16a..5507649ac42 100644 --- a/gcc/config/i386/i386-interix.h +++ b/gcc/config/i386/i386-interix.h @@ -71,9 +71,9 @@ Boston, MA 02111-1307, USA. */ else \ { \ builtin_define_std ("LANGUAGE_C"); \ - if (c_language == clk_cplusplus) \ + if (c_dialect_cxx ()) \ builtin_define_std ("LANGUAGE_C_PLUS_PLUS"); \ - if (flag_objc) \ + if (c_dialect_objc ()) \ builtin_define_std ("LANGUAGE_OBJECTIVE_C"); \ } \ } \ diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h index 60674ba49b4..40094840719 100644 --- a/gcc/config/ia64/hpux.h +++ b/gcc/config/ia64/hpux.h @@ -42,7 +42,7 @@ do { \ builtin_define("__fpreg=long double"); \ builtin_define("__float80=long double"); \ builtin_define("__float128=long double"); \ - if (c_language == clk_cplusplus || !flag_iso) \ + if (c_dialect_cxx () || !flag_iso) \ { \ builtin_define("_HPUX_SOURCE"); \ builtin_define("__STDC_EXT__"); \ diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h index 6a3e792290c..efdf4c245fe 100644 --- a/gcc/config/mips/iris6.h +++ b/gcc/config/mips/iris6.h @@ -128,11 +128,11 @@ Boston, MA 02111-1307, USA. */ /* IRIX 6.5.18 and above provide many ISO C99 \ features protected by the __c99 macro. \ libstdc++ v3 needs them as well. */ \ - if ((c_language == clk_c && flag_isoc99) \ - || c_language == clk_cplusplus) \ + if ((!c_dialect_cxx () && flag_isoc99) \ + || c_dialect_cxx ()) \ builtin_define ("__c99"); \ \ - if (c_language == clk_cplusplus) \ + if (c_dialect_cxx ()) \ { \ builtin_define ("__EXTENSIONS__"); \ builtin_define ("_SGI_SOURCE"); \ diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index 50526e94b9e..f39250f362c 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -126,7 +126,7 @@ void FN () \ builtin_define_std ("linux"); \ builtin_assert ("system=linux"); \ /* The GNU C++ standard library requires this. */ \ - if (c_language == clk_cplusplus) \ + if (c_dialect_cxx ()) \ builtin_define ("_GNU_SOURCE"); \ \ if (mips_abi == ABI_N32) \ diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 6325d9534a9..06cf288ff42 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -479,18 +479,18 @@ extern void sbss_section PARAMS ((void)); builtin_define_std ("LANGUAGE_ASSEMBLY"); \ builtin_define ("_LANGUAGE_ASSEMBLY"); \ } \ - else if (c_language == clk_c) \ - { \ - builtin_define_std ("LANGUAGE_C"); \ - builtin_define ("_LANGUAGE_C"); \ - } \ - else if (c_language == clk_cplusplus) \ + else if (c_dialect_cxx ()) \ { \ builtin_define ("_LANGUAGE_C_PLUS_PLUS"); \ builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \ builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \ } \ - if (flag_objc) \ + else \ + { \ + builtin_define_std ("LANGUAGE_C"); \ + builtin_define ("_LANGUAGE_C"); \ + } \ + if (c_dialect_objc ()) \ { \ builtin_define ("_LANGUAGE_OBJECTIVE_C"); \ builtin_define ("__LANGUAGE_OBJECTIVE_C"); \ diff --git a/gcc/config/pa/pa-hpux.h b/gcc/config/pa/pa-hpux.h index d6e15164013..5b99ee5aadc 100644 --- a/gcc/config/pa/pa-hpux.h +++ b/gcc/config/pa/pa-hpux.h @@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */ builtin_define ("__hpux__"); \ builtin_define ("__unix"); \ builtin_define ("__unix__"); \ - if (c_language == clk_cplusplus) \ + if (c_dialect_cxx ()) \ { \ builtin_define ("_HPUX_SOURCE"); \ builtin_define ("_INCLUDE_LONGLONG"); \ diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h index 1c895983ef1..78ac2afef0d 100644 --- a/gcc/config/pa/pa-hpux10.h +++ b/gcc/config/pa/pa-hpux10.h @@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ builtin_define ("__hpux__"); \ builtin_define ("__unix"); \ builtin_define ("__unix__"); \ - if (c_language == clk_cplusplus) \ + if (c_dialect_cxx ()) \ { \ builtin_define ("_HPUX_SOURCE"); \ builtin_define ("_INCLUDE_LONGLONG"); \ diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h index a1dbf20a454..5a35ace408b 100644 --- a/gcc/config/pa/pa-hpux11.h +++ b/gcc/config/pa/pa-hpux11.h @@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */ builtin_define ("__hpux__"); \ builtin_define ("__unix"); \ builtin_define ("__unix__"); \ - if (c_language == clk_cplusplus) \ + if (c_dialect_cxx ()) \ { \ builtin_define ("_HPUX_SOURCE"); \ builtin_define ("_INCLUDE_LONGLONG"); \ diff --git a/gcc/config/pa/pa-pro-end.h b/gcc/config/pa/pa-pro-end.h index e6322e532a5..927f424bc50 100644 --- a/gcc/config/pa/pa-pro-end.h +++ b/gcc/config/pa/pa-pro-end.h @@ -29,8 +29,7 @@ Boston, MA 02111-1307, USA. */ #define TARGET_OS_CPP_BUILTINS() \ do \ { \ - if (c_language != clk_cplusplus \ - && !flag_iso) \ + if (!c_dialect_cxx () && !flag_iso) \ { \ builtin_define ("hppa"); \ builtin_define_std ("PWB"); \ diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 4d71cdc3ad8..9c6a4a4727f 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -388,8 +388,7 @@ do { \ builtin_define_std ("hp800"); \ builtin_define_std ("hp9000"); \ builtin_define_std ("hp9k8"); \ - if (c_language != clk_cplusplus \ - && !flag_iso) \ + if (!c_dialect_cxx () && !flag_iso) \ builtin_define ("hppa"); \ builtin_define_std ("spectrum"); \ builtin_define_std ("unix"); \ diff --git a/gcc/config/pa/rtems.h b/gcc/config/pa/rtems.h index c71ac6e8441..14a8b2a6d6c 100644 --- a/gcc/config/pa/rtems.h +++ b/gcc/config/pa/rtems.h @@ -25,8 +25,7 @@ Boston, MA 02111-1307, USA. */ #define TARGET_OS_CPP_BUILTINS() \ do \ { \ - if (c_language != clk_cplusplus \ - && !flag_iso) \ + if (!c_dialect_cxx () && !flag_iso) \ { \ builtin_define ("hppa"); \ builtin_define_std ("PWB"); \ diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index b5fb3d54061..950472d77ac 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -66,7 +66,7 @@ Boston, MA 02111-1307, USA. */ /* For C++ we need to add some additional macro \ definitions required by the C++ standard \ library. */ \ - if (c_language == clk_cplusplus) \ + if (c_dialect_cxx ()) \ { \ builtin_define ("_XOPEN_SOURCE=500"); \ builtin_define ("_LARGEFILE_SOURCE=1"); \