Commit cb99b61a by John David Anglin Committed by John David Anglin

re PR c++/11712 ([HPUX 11.00 - gcc 3.3] __STDC_EXT__ not defined for .cpp by default anymore?)

	PR c++/11712
	* pa-hpux.h, pa-hpux10.h, pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Define
	__STDC_EXT__ when using C++ dialect.

From-SVN: r70240
parent 4e3916ba
2003-08-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR c++/11712
* pa-hpux.h, pa-hpux10.h, pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Define
__STDC_EXT__ when using C++ dialect.
2003-08-07 J"orn Rennecke <joern.rennecke@superh.com> 2003-08-07 J"orn Rennecke <joern.rennecke@superh.com>
* sh.c (calc_live_regs): If the return address pointer is live, * sh.c (calc_live_regs): If the return address pointer is live,
......
...@@ -28,6 +28,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -28,6 +28,12 @@ Boston, MA 02111-1307, USA. */
#define SIZE_TYPE "unsigned int" #define SIZE_TYPE "unsigned int"
#define PTRDIFF_TYPE "int" #define PTRDIFF_TYPE "int"
/* GCC always defines __STDC__. HP C++ compilers don't define it. This
causes trouble when sys/stdsyms.h is included. As a work around,
we define __STDC_EXT__. A similar situation exists with respect to
the definition of __cplusplus. We define _INCLUDE_LONGLONG
to prevent nlist.h from defining __STDC_32_MODE__ (no longlong
support). */
#undef TARGET_OS_CPP_BUILTINS #undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
do \ do \
...@@ -46,6 +52,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -46,6 +52,7 @@ Boston, MA 02111-1307, USA. */
{ \ { \
builtin_define ("_HPUX_SOURCE"); \ builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \ builtin_define ("_INCLUDE_LONGLONG"); \
builtin_define ("__STDC_EXT__"); \
} \ } \
else if (!flag_iso) \ else if (!flag_iso) \
{ \ { \
......
...@@ -20,6 +20,12 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -20,6 +20,12 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* GCC always defines __STDC__. HP C++ compilers don't define it. This
causes trouble when sys/stdsyms.h is included. As a work around,
we define __STDC_EXT__. A similar situation exists with respect to
the definition of __cplusplus. We define _INCLUDE_LONGLONG
to prevent nlist.h from defining __STDC_32_MODE__ (no longlong
support). */
#undef TARGET_OS_CPP_BUILTINS #undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
do \ do \
...@@ -36,6 +42,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -36,6 +42,7 @@ Boston, MA 02111-1307, USA. */
{ \ { \
builtin_define ("_HPUX_SOURCE"); \ builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \ builtin_define ("_INCLUDE_LONGLONG"); \
builtin_define ("__STDC_EXT__"); \
} \ } \
else if (!flag_iso) \ else if (!flag_iso) \
{ \ { \
......
...@@ -18,6 +18,12 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -18,6 +18,12 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* GCC always defines __STDC__. HP C++ compilers don't define it. This
causes trouble when sys/stdsyms.h is included. As a work around,
we define __STDC_EXT__. A similar situation exists with respect to
the definition of __cplusplus. We define _INCLUDE_LONGLONG
to prevent nlist.h from defining __STDC_32_MODE__ (no longlong
support). */
#undef TARGET_OS_CPP_BUILTINS #undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
do \ do \
...@@ -34,6 +40,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -34,6 +40,7 @@ Boston, MA 02111-1307, USA. */
{ \ { \
builtin_define ("_HPUX_SOURCE"); \ builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \ builtin_define ("_INCLUDE_LONGLONG"); \
builtin_define ("__STDC_EXT__"); \
} \ } \
else \ else \
{ \ { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment