Commit 5ee5eddb by John David Anglin

re PR libgomp/93066 (libgomp/target.c:525:46: error: expected expression before ')' token)

	PR libgomp/93066
	* inclhack.def (hpux_c99_inttypes3): Fix defines for INTPTR_MAX
	and UINTPTR_MAX, and missing define for SIZE_MAX.
	* fixincl.x: Regenerate.
	* tests/base/inttypes.h: Update for above fix.

From-SVN: r279773
parent 4559be23
2019-12-30 John David Anglin <danglin@gcc.gnu.org>
PR libgomp/93066
* inclhack.def (hpux_c99_inttypes3): Fix defines for INTPTR_MAX
and UINTPTR_MAX, and missing define for SIZE_MAX.
* fixincl.x: Regenerate.
* tests/base/inttypes.h: Update for above fix.
2019-08-18 C.G. Dogan <gcc+cgdogan.00@gmail.com> 2019-08-18 C.G. Dogan <gcc+cgdogan.00@gmail.com>
Iain Sandoe <iain@sandoe.co.uk> Iain Sandoe <iain@sandoe.co.uk>
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* *
* DO NOT EDIT THIS FILE (fixincl.x) * DO NOT EDIT THIS FILE (fixincl.x)
* *
* It has been AutoGen-ed June 21, 2019 at 09:13:33 PM by AutoGen 5.17.4 * It has been AutoGen-ed December 30, 2019 at 03:30:20 PM by AutoGen 5.18.16
* From the definitions inclhack.def * From the definitions inclhack.def
* and the template file fixincl * and the template file fixincl
*/ */
/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jun 21 21:13:33 BST 2019 /* DO NOT SVN-MERGE THIS FILE, EITHER Mon Dec 30 15:30:20 EST 2019
* *
* You must regenerate it. Use the ./genfixes script. * You must regenerate it. Use the ./genfixes script.
* *
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work * certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search. * correctly with ANSI C and placed in a directory that GNU C will search.
* *
* This file contains 256 fixup descriptions. * This file contains 257 fixup descriptions.
* *
* See README for more information. * See README for more information.
* *
...@@ -5149,6 +5149,55 @@ static const char* apzHpux_C99_Inttypes2Patch[] = { sed_cmd_z, ...@@ -5149,6 +5149,55 @@ static const char* apzHpux_C99_Inttypes2Patch[] = { sed_cmd_z,
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Hpux_C99_Inttypes3 fix
*/
tSCC zHpux_C99_Inttypes3Name[] =
"hpux_c99_inttypes3";
/*
* File name selection pattern
*/
tSCC zHpux_C99_Inttypes3List[] =
"inttypes.h\0";
/*
* Machine/OS name selection pattern
*/
tSCC* apzHpux_C99_Inttypes3Machs[] = {
"hppa*-hp-hpux11*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zHpux_C99_Inttypes3Select0[] =
"#define[ \t]INTPTR_MAX[ \t]*\n\
#define[ \t]UINTPTR_MAX[ \t]*\n";
#define HPUX_C99_INTTYPES3_TEST_CT 1
static tTestDesc aHpux_C99_Inttypes3Tests[] = {
{ TT_EGREP, zHpux_C99_Inttypes3Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Hpux_C99_Inttypes3
*/
static const char* apzHpux_C99_Inttypes3Patch[] = {
"format",
"#undef SIZE_MAX\n\
#define SIZE_MAX __SIZE_MAX__\n\
#ifdef __INTPTR_MAX__\n\
# undef INTPTR_MAX\n\
# define INTPTR_MAX __INTPTR_MAX__\n\
# undef INTPTR_MIN\n\
# define INTPTR_MIN (-INTPTR_MAX - 1)\n\
#endif\n\
#ifdef __UINTPTR_MAX__\n\
# undef UINTPTR_MAX\n\
# define UINTPTR_MAX __UINTPTR_MAX__\n\
#endif\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux_Ctype_Macros fix * Description of Hpux_Ctype_Macros fix
*/ */
tSCC zHpux_Ctype_MacrosName[] = tSCC zHpux_Ctype_MacrosName[] =
...@@ -10396,9 +10445,9 @@ static const char* apzX11_SprintfPatch[] = { ...@@ -10396,9 +10445,9 @@ static const char* apzX11_SprintfPatch[] = {
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 295 #define REGEX_COUNT 296
#define MACH_LIST_SIZE_LIMIT 187 #define MACH_LIST_SIZE_LIMIT 187
#define FIX_COUNT 256 #define FIX_COUNT 257
/* /*
* Enumerate the fixes * Enumerate the fixes
...@@ -10527,6 +10576,7 @@ typedef enum { ...@@ -10527,6 +10576,7 @@ typedef enum {
HPUX_C99_INTPTR_FIXIDX, HPUX_C99_INTPTR_FIXIDX,
HPUX_C99_INTTYPES_FIXIDX, HPUX_C99_INTTYPES_FIXIDX,
HPUX_C99_INTTYPES2_FIXIDX, HPUX_C99_INTTYPES2_FIXIDX,
HPUX_C99_INTTYPES3_FIXIDX,
HPUX_CTYPE_MACROS_FIXIDX, HPUX_CTYPE_MACROS_FIXIDX,
HPUX_EXTERN_ERRNO_FIXIDX, HPUX_EXTERN_ERRNO_FIXIDX,
HPUX_HTONL_FIXIDX, HPUX_HTONL_FIXIDX,
...@@ -11278,6 +11328,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -11278,6 +11328,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX_C99_INTTYPES2_TEST_CT, FD_MACH_ONLY, HPUX_C99_INTTYPES2_TEST_CT, FD_MACH_ONLY,
aHpux_C99_Inttypes2Tests, apzHpux_C99_Inttypes2Patch, 0 }, aHpux_C99_Inttypes2Tests, apzHpux_C99_Inttypes2Patch, 0 },
{ zHpux_C99_Inttypes3Name, zHpux_C99_Inttypes3List,
apzHpux_C99_Inttypes3Machs,
HPUX_C99_INTTYPES3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux_C99_Inttypes3Tests, apzHpux_C99_Inttypes3Patch, 0 },
{ zHpux_Ctype_MacrosName, zHpux_Ctype_MacrosList, { zHpux_Ctype_MacrosName, zHpux_Ctype_MacrosList,
apzHpux_Ctype_MacrosMachs, apzHpux_Ctype_MacrosMachs,
HPUX_CTYPE_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, HPUX_CTYPE_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
......
...@@ -2588,6 +2588,32 @@ fix = { ...@@ -2588,6 +2588,32 @@ fix = {
}; };
/* /*
* Fix broken and missing defines in inttypes.h
*/
fix = {
hackname = hpux_c99_inttypes3;
mach = "hppa*-hp-hpux11*";
files = inttypes.h;
select = "#define[ \t]INTPTR_MAX[ \t]*\n"
"#define[ \t]UINTPTR_MAX[ \t]*\n";
c_fix = format;
c_fix_arg = "#undef SIZE_MAX\n"
"#define SIZE_MAX __SIZE_MAX__\n"
"#ifdef __INTPTR_MAX__\n"
"# undef INTPTR_MAX\n"
"# define INTPTR_MAX __INTPTR_MAX__\n"
"# undef INTPTR_MIN\n"
"# define INTPTR_MIN (-INTPTR_MAX - 1)\n"
"#endif\n"
"#ifdef __UINTPTR_MAX__\n"
"# undef UINTPTR_MAX\n"
"# define UINTPTR_MAX __UINTPTR_MAX__\n"
"#endif\n";
test_text = "#define INTPTR_MAX\n"
"#define UINTPTR_MAX\n";
};
/*
* Fix hpux broken ctype macros * Fix hpux broken ctype macros
*/ */
fix = { fix = {
......
...@@ -16,3 +16,20 @@ ...@@ -16,3 +16,20 @@
#define UINT32_C(__c) __CONCAT__(__c,u) #define UINT32_C(__c) __CONCAT__(__c,u)
#endif /* HPUX_C99_INTTYPES_CHECK */ #endif /* HPUX_C99_INTTYPES_CHECK */
#if defined( HPUX_C99_INTTYPES3_CHECK )
#undef SIZE_MAX
#define SIZE_MAX __SIZE_MAX__
#ifdef __INTPTR_MAX__
# undef INTPTR_MAX
# define INTPTR_MAX __INTPTR_MAX__
# undef INTPTR_MIN
# define INTPTR_MIN (-INTPTR_MAX - 1)
#endif
#ifdef __UINTPTR_MAX__
# undef UINTPTR_MAX
# define UINTPTR_MAX __UINTPTR_MAX__
#endif
#endif /* HPUX_C99_INTTYPES3_CHECK */
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