re PR bootstrap/66319 (gcov-tool.c:84:65: error: invalid conversion from 'int (*...
authorJohn David Anglin <danglin@gcc.gnu.org>
Sat, 6 Jun 2015 18:33:06 +0000 (18:33 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 6 Jun 2015 18:33:06 +0000 (18:33 +0000)
PR bootstrap/66319
* config/pa/pa-hpux10.h (TARGET_OS_CPP_BUILTINS): Rearrange builtin
defines.  Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE for c++.
Define _XOPEN_UNIX and _XOPEN_SOURCE_EXTENDED for c++ if unix95 or
later.
* config/pa/pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Likewise.
Define _INCLUDE_STDC_SOURCE_PRE_199901, _INCLUDE_STDC_SOURCE_199901,
_INCLUDE_XOPEN_SOURCE_PRE_500, _INCLUDE_XOPEN_SOURCE_520,
_INCLUDE_XOPEN_SOURCE_PRE_600 and _INCLUDE_XOPEN_SOURCE_600 for c++
and non iso if unix2003.

From-SVN: r224192

gcc/ChangeLog
gcc/config/pa/pa-hpux10.h
gcc/config/pa/pa-hpux11.h

index 4d578087dc30622ca9b6a41d6718ace80e21ff44..3c1b02aceb6ecf996d02fb60e8c2abddc66c7313 100644 (file)
@@ -1,3 +1,16 @@
+2015-06-06  John David Anglin  <danglin@gcc.gnu.org>
+
+       PR bootstrap/66319
+       * config/pa/pa-hpux10.h (TARGET_OS_CPP_BUILTINS): Rearrange builtin
+       defines.  Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE for c++.
+       Define _XOPEN_UNIX and _XOPEN_SOURCE_EXTENDED for c++ if unix95 or
+       later.
+       * config/pa/pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Likewise.
+       Define _INCLUDE_STDC_SOURCE_PRE_199901, _INCLUDE_STDC_SOURCE_199901,
+       _INCLUDE_XOPEN_SOURCE_PRE_500, _INCLUDE_XOPEN_SOURCE_520,
+       _INCLUDE_XOPEN_SOURCE_PRE_600 and _INCLUDE_XOPEN_SOURCE_600 for c++
+       and non iso if unix2003.
+
 2015-06-06  Aldy Hernandez  <aldyh@redhat.com>
 
        * dwarf2out.c (gen_lexical_block_die): Initialize stmt_die.
index 94668b2c819574e2d72d59dc35af114e9b532fc8..1731ddc8b4d5dc76f741111f87c2de6b275d474a 100644 (file)
@@ -24,7 +24,9 @@ along with GCC; see the file COPYING3.  If not see
    the definition of __cplusplus.  We define _INCLUDE_LONGLONG
    to prevent nlist.h from defining __STDC_32_MODE__ (no longlong
    support).  We define __STDCPP__ to get certain system headers
-   (notably assert.h) to assume standard preprocessor behavior in C++.  */
+   (notably assert.h) to assume standard preprocessor behavior in C++.
+   We define _XOPEN_SOURCE_EXTENDED when we define _HPUX_SOURCE to avoid
+   non standard hpux variants in _INCLUDE_XOPEN_SOURCE_EXTENDED.  */
 #undef TARGET_OS_CPP_BUILTINS
 #define TARGET_OS_CPP_BUILTINS()                                       \
   do                                                                   \
@@ -44,8 +46,20 @@ along with GCC; see the file COPYING3.  If not see
            builtin_define ("_REENTRANT");                              \
            builtin_define ("_INCLUDE_LONGLONG");                       \
            builtin_define ("__STDCPP__");                              \
+           builtin_define ("_LARGEFILE_SOURCE");                       \
+           builtin_define ("_LARGEFILE64_SOURCE");                     \
+           if (flag_pa_unix >= 1995)                                   \
+             {                                                         \
+               builtin_define ("_XOPEN_UNIX");                         \
+               builtin_define ("_XOPEN_SOURCE_EXTENDED");              \
+             }                                                         \
          }                                                             \
-       else if (!flag_iso)                                             \
+       else if (flag_iso)                                              \
+         {                                                             \
+           if (flag_isoc94)                                            \
+             builtin_define ("_INCLUDE__STDC_A1_SOURCE");              \
+         }                                                             \
+       else                                                            \
          {                                                             \
            builtin_define ("_HPUX_SOURCE");                            \
            builtin_define ("_REENTRANT");                              \
@@ -59,11 +73,11 @@ along with GCC; see the file COPYING3.  If not see
                builtin_define ("_PWB");                                \
                builtin_define ("PWB");                                 \
              }                                                         \
-         }                                                             \
-       if (flag_pa_unix >= 1995)                                       \
-         {                                                             \
-           builtin_define ("_XOPEN_UNIX");                             \
-           builtin_define ("_XOPEN_SOURCE_EXTENDED");                  \
+           if (flag_pa_unix >= 1995)                                   \
+             {                                                         \
+               builtin_define ("_XOPEN_UNIX");                         \
+               builtin_define ("_XOPEN_SOURCE_EXTENDED");              \
+             }                                                         \
          }                                                             \
        if (TARGET_SIO)                                                 \
          builtin_define ("_SIO");                                      \
index 40d49a000fcc3ca18e0d6e135b90f92770b01e6b..31a66f4a0f7c083a64ce73759c43ad0985d82112 100644 (file)
@@ -23,7 +23,9 @@ along with GCC; see the file COPYING3.  If not see
    the definition of __cplusplus.  We define _INCLUDE_LONGLONG
    to prevent nlist.h from defining __STDC_32_MODE__ (no longlong
    support).  We define __STDCPP__ to get certain system headers
-   (notably assert.h) to assume standard preprocessor behavior in C++.  */
+   (notably assert.h) to assume standard preprocessor behavior in C++.
+   We define _XOPEN_SOURCE_EXTENDED when we define _HPUX_SOURCE to avoid
+   non standard hpux variants in _INCLUDE_XOPEN_SOURCE_EXTENDED.  */
 #undef TARGET_OS_CPP_BUILTINS
 #define TARGET_OS_CPP_BUILTINS()                                       \
   do                                                                   \
@@ -43,46 +45,69 @@ along with GCC; see the file COPYING3.  If not see
            builtin_define ("_REENTRANT");                              \
            builtin_define ("_INCLUDE_LONGLONG");                       \
            builtin_define ("__STDCPP__");                              \
-         }                                                             \
-       else                                                            \
-         {                                                             \
-           if (!flag_iso)                                              \
+           builtin_define ("_LARGEFILE_SOURCE");                       \
+           builtin_define ("_LARGEFILE64_SOURCE");                     \
+           if (flag_pa_unix >= 1995)                                   \
+             {                                                         \
+               builtin_define ("_XOPEN_UNIX");                         \
+               builtin_define ("_XOPEN_SOURCE_EXTENDED");              \
+             }                                                         \
+           if (flag_pa_unix >= 1998)                                   \
              {                                                         \
-               builtin_define ("_HPUX_SOURCE");                        \
-               builtin_define ("_REENTRANT");                          \
-               if (preprocessing_trad_p ())                            \
-                 {                                                     \
-                   builtin_define ("hp9000s800");                      \
-                   builtin_define ("hppa");                            \
-                   builtin_define ("hpux");                            \
-                   builtin_define ("unix");                            \
-                   builtin_define ("__CLASSIC_C__");                   \
-                   builtin_define ("_PWB");                            \
-                   builtin_define ("PWB");                             \
-                 }                                                     \
+               builtin_define ("_INCLUDE__STDC_A1_SOURCE");            \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_500");           \
+             }                                                         \
+           if (flag_pa_unix >= 2003)                                   \
+             {                                                         \
+               builtin_define ("_INCLUDE_STDC_SOURCE_PRE_199901");     \
+               builtin_define ("_INCLUDE_STDC_SOURCE_199901");         \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_PRE_500");       \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_520");           \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_PRE_600");       \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_600");           \
              }                                                         \
          }                                                             \
-       if (!TARGET_64BIT)                                              \
-         builtin_define ("_ILP32");                                    \
-       if (flag_pa_unix >= 1995 && !flag_iso)                          \
+       else if (flag_iso)                                              \
          {                                                             \
-           builtin_define ("_XOPEN_UNIX");                             \
-           builtin_define ("_XOPEN_SOURCE_EXTENDED");                  \
+           if (flag_isoc94)                                            \
+             builtin_define ("_INCLUDE__STDC_A1_SOURCE");              \
          }                                                             \
-       if (TARGET_HPUX_11_11)                                          \
+       else                                                            \
          {                                                             \
+           builtin_define ("_HPUX_SOURCE");                            \
+           builtin_define ("_REENTRANT");                              \
+           if (preprocessing_trad_p ())                                \
+             {                                                         \
+               builtin_define ("hp9000s800");                          \
+               builtin_define ("hppa");                                \
+               builtin_define ("hpux");                                \
+               builtin_define ("unix");                                \
+               builtin_define ("__CLASSIC_C__");                       \
+               builtin_define ("_PWB");                                \
+               builtin_define ("PWB");                                 \
+             }                                                         \
+           if (flag_pa_unix >= 1995)                                   \
+             {                                                         \
+               builtin_define ("_XOPEN_UNIX");                         \
+               builtin_define ("_XOPEN_SOURCE_EXTENDED");              \
+             }                                                         \
            if (flag_pa_unix >= 1998)                                   \
              {                                                         \
-               if (flag_isoc94 || flag_isoc99 || c_dialect_cxx()       \
-                   || !flag_iso)                                       \
-                 builtin_define ("_INCLUDE__STDC_A1_SOURCE");          \
-               if (!flag_iso)                                          \
-                 builtin_define ("_INCLUDE_XOPEN_SOURCE_500");         \
+               builtin_define ("_INCLUDE__STDC_A1_SOURCE");            \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_500");           \
+             }                                                         \
+           if (flag_pa_unix >= 2003)                                   \
+             {                                                         \
+               builtin_define ("_INCLUDE_STDC_SOURCE_PRE_199901");     \
+               builtin_define ("_INCLUDE_STDC_SOURCE_199901");         \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_PRE_500");       \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_520");           \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_PRE_600");       \
+               builtin_define ("_INCLUDE_XOPEN_SOURCE_600");           \
              }                                                         \
-           else if (flag_isoc94 || flag_isoc99 || c_dialect_cxx ())    \
-             warning (0, "-munix=98 option required for C89 "          \
-                      "Amendment 1 features.\n");                      \
          }                                                             \
+       if (!TARGET_64BIT)                                              \
+         builtin_define ("_ILP32");                                    \
        if (TARGET_SIO)                                                 \
          builtin_define ("_SIO");                                      \
        else                                                            \