summaryrefslogtreecommitdiffstats
path: root/fixincludes
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2019-12-30 20:33:17 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2019-12-30 20:33:17 +0000
commit5ee5eddb26e6007aaa2fadd19a55d6bc03cb2baa (patch)
tree2d7f977776afd73b2c335b0627346390b76b0e3c /fixincludes
parentFix builtin functions needlessly using VIEW_CONVERT_EXPRs on their operands. (diff)
downloadgcc-5ee5eddb26e6007aaa2fadd19a55d6bc03cb2baa.tar.gz
gcc-5ee5eddb26e6007aaa2fadd19a55d6bc03cb2baa.tar.bz2
gcc-5ee5eddb26e6007aaa2fadd19a55d6bc03cb2baa.tar.xz
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
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog8
-rw-r--r--fixincludes/fixincl.x65
-rw-r--r--fixincludes/inclhack.def26
-rw-r--r--fixincludes/tests/base/inttypes.h17
4 files changed, 111 insertions, 5 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 03c2313bd8e..c0abf7c3f62 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,11 @@
12019-12-30 John David Anglin <danglin@gcc.gnu.org>
2
3 PR libgomp/93066
4 * inclhack.def (hpux_c99_inttypes3): Fix defines for INTPTR_MAX
5 and UINTPTR_MAX, and missing define for SIZE_MAX.
6 * fixincl.x: Regenerate.
7 * tests/base/inttypes.h: Update for above fix.
8
12019-08-18 C.G. Dogan <gcc+cgdogan.00@gmail.com> 92019-08-18 C.G. Dogan <gcc+cgdogan.00@gmail.com>
2 Iain Sandoe <iain@sandoe.co.uk> 10 Iain Sandoe <iain@sandoe.co.uk>
3 11
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index e5ae601eca0..8b9b547e626 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
2 * 2 *
3 * DO NOT EDIT THIS FILE (fixincl.x) 3 * DO NOT EDIT THIS FILE (fixincl.x)
4 * 4 *
5 * It has been AutoGen-ed June 21, 2019 at 09:13:33 PM by AutoGen 5.17.4 5 * It has been AutoGen-ed December 30, 2019 at 03:30:20 PM by AutoGen 5.18.16
6 * From the definitions inclhack.def 6 * From the definitions inclhack.def
7 * and the template file fixincl 7 * and the template file fixincl
8 */ 8 */
9/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jun 21 21:13:33 BST 2019 9/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Dec 30 15:30:20 EST 2019
10 * 10 *
11 * You must regenerate it. Use the ./genfixes script. 11 * You must regenerate it. Use the ./genfixes script.
12 * 12 *
@@ -15,7 +15,7 @@
15 * certain ANSI-incompatible system header files which are fixed to work 15 * certain ANSI-incompatible system header files which are fixed to work
16 * correctly with ANSI C and placed in a directory that GNU C will search. 16 * correctly with ANSI C and placed in a directory that GNU C will search.
17 * 17 *
18 * This file contains 256 fixup descriptions. 18 * This file contains 257 fixup descriptions.
19 * 19 *
20 * See README for more information. 20 * See README for more information.
21 * 21 *
@@ -5149,6 +5149,55 @@ static const char* apzHpux_C99_Inttypes2Patch[] = { sed_cmd_z,
5149 5149
5150/* * * * * * * * * * * * * * * * * * * * * * * * * * 5150/* * * * * * * * * * * * * * * * * * * * * * * * * *
5151 * 5151 *
5152 * Description of Hpux_C99_Inttypes3 fix
5153 */
5154tSCC zHpux_C99_Inttypes3Name[] =
5155 "hpux_c99_inttypes3";
5156
5157/*
5158 * File name selection pattern
5159 */
5160tSCC zHpux_C99_Inttypes3List[] =
5161 "inttypes.h\0";
5162/*
5163 * Machine/OS name selection pattern
5164 */
5165tSCC* apzHpux_C99_Inttypes3Machs[] = {
5166 "hppa*-hp-hpux11*",
5167 (const char*)NULL };
5168
5169/*
5170 * content selection pattern - do fix if pattern found
5171 */
5172tSCC zHpux_C99_Inttypes3Select0[] =
5173 "#define[ \t]INTPTR_MAX[ \t]*\n\
5174#define[ \t]UINTPTR_MAX[ \t]*\n";
5175
5176#define HPUX_C99_INTTYPES3_TEST_CT 1
5177static tTestDesc aHpux_C99_Inttypes3Tests[] = {
5178 { TT_EGREP, zHpux_C99_Inttypes3Select0, (regex_t*)NULL }, };
5179
5180/*
5181 * Fix Command Arguments for Hpux_C99_Inttypes3
5182 */
5183static const char* apzHpux_C99_Inttypes3Patch[] = {
5184 "format",
5185 "#undef SIZE_MAX\n\
5186#define SIZE_MAX __SIZE_MAX__\n\
5187#ifdef __INTPTR_MAX__\n\
5188# undef INTPTR_MAX\n\
5189# define INTPTR_MAX __INTPTR_MAX__\n\
5190# undef INTPTR_MIN\n\
5191# define INTPTR_MIN (-INTPTR_MAX - 1)\n\
5192#endif\n\
5193#ifdef __UINTPTR_MAX__\n\
5194# undef UINTPTR_MAX\n\
5195# define UINTPTR_MAX __UINTPTR_MAX__\n\
5196#endif\n",
5197 (char*)NULL };
5198
5199/* * * * * * * * * * * * * * * * * * * * * * * * * *
5200 *
5152 * Description of Hpux_Ctype_Macros fix 5201 * Description of Hpux_Ctype_Macros fix
5153 */ 5202 */
5154tSCC zHpux_Ctype_MacrosName[] = 5203tSCC zHpux_Ctype_MacrosName[] =
@@ -10396,9 +10445,9 @@ static const char* apzX11_SprintfPatch[] = {
10396 * 10445 *
10397 * List of all fixes 10446 * List of all fixes
10398 */ 10447 */
10399#define REGEX_COUNT 295 10448#define REGEX_COUNT 296
10400#define MACH_LIST_SIZE_LIMIT 187 10449#define MACH_LIST_SIZE_LIMIT 187
10401#define FIX_COUNT 256 10450#define FIX_COUNT 257
10402 10451
10403/* 10452/*
10404 * Enumerate the fixes 10453 * Enumerate the fixes
@@ -10527,6 +10576,7 @@ typedef enum {
10527 HPUX_C99_INTPTR_FIXIDX, 10576 HPUX_C99_INTPTR_FIXIDX,
10528 HPUX_C99_INTTYPES_FIXIDX, 10577 HPUX_C99_INTTYPES_FIXIDX,
10529 HPUX_C99_INTTYPES2_FIXIDX, 10578 HPUX_C99_INTTYPES2_FIXIDX,
10579 HPUX_C99_INTTYPES3_FIXIDX,
10530 HPUX_CTYPE_MACROS_FIXIDX, 10580 HPUX_CTYPE_MACROS_FIXIDX,
10531 HPUX_EXTERN_ERRNO_FIXIDX, 10581 HPUX_EXTERN_ERRNO_FIXIDX,
10532 HPUX_HTONL_FIXIDX, 10582 HPUX_HTONL_FIXIDX,
@@ -11278,6 +11328,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
11278 HPUX_C99_INTTYPES2_TEST_CT, FD_MACH_ONLY, 11328 HPUX_C99_INTTYPES2_TEST_CT, FD_MACH_ONLY,
11279 aHpux_C99_Inttypes2Tests, apzHpux_C99_Inttypes2Patch, 0 }, 11329 aHpux_C99_Inttypes2Tests, apzHpux_C99_Inttypes2Patch, 0 },
11280 11330
11331 { zHpux_C99_Inttypes3Name, zHpux_C99_Inttypes3List,
11332 apzHpux_C99_Inttypes3Machs,
11333 HPUX_C99_INTTYPES3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
11334 aHpux_C99_Inttypes3Tests, apzHpux_C99_Inttypes3Patch, 0 },
11335
11281 { zHpux_Ctype_MacrosName, zHpux_Ctype_MacrosList, 11336 { zHpux_Ctype_MacrosName, zHpux_Ctype_MacrosList,
11282 apzHpux_Ctype_MacrosMachs, 11337 apzHpux_Ctype_MacrosMachs,
11283 HPUX_CTYPE_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, 11338 HPUX_CTYPE_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 3c6b48d26e1..bf136fdaa20 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -2588,6 +2588,32 @@ fix = {
2588}; 2588};
2589 2589
2590/* 2590/*
2591 * Fix broken and missing defines in inttypes.h
2592 */
2593fix = {
2594 hackname = hpux_c99_inttypes3;
2595 mach = "hppa*-hp-hpux11*";
2596 files = inttypes.h;
2597 select = "#define[ \t]INTPTR_MAX[ \t]*\n"
2598 "#define[ \t]UINTPTR_MAX[ \t]*\n";
2599 c_fix = format;
2600 c_fix_arg = "#undef SIZE_MAX\n"
2601 "#define SIZE_MAX __SIZE_MAX__\n"
2602 "#ifdef __INTPTR_MAX__\n"
2603 "# undef INTPTR_MAX\n"
2604 "# define INTPTR_MAX __INTPTR_MAX__\n"
2605 "# undef INTPTR_MIN\n"
2606 "# define INTPTR_MIN (-INTPTR_MAX - 1)\n"
2607 "#endif\n"
2608 "#ifdef __UINTPTR_MAX__\n"
2609 "# undef UINTPTR_MAX\n"
2610 "# define UINTPTR_MAX __UINTPTR_MAX__\n"
2611 "#endif\n";
2612 test_text = "#define INTPTR_MAX\n"
2613 "#define UINTPTR_MAX\n";
2614};
2615
2616/*
2591 * Fix hpux broken ctype macros 2617 * Fix hpux broken ctype macros
2592 */ 2618 */
2593fix = { 2619fix = {
diff --git a/fixincludes/tests/base/inttypes.h b/fixincludes/tests/base/inttypes.h
index 3f556856a41..e2216832666 100644
--- a/fixincludes/tests/base/inttypes.h
+++ b/fixincludes/tests/base/inttypes.h
@@ -16,3 +16,20 @@
16#define UINT32_C(__c) __CONCAT__(__c,u) 16#define UINT32_C(__c) __CONCAT__(__c,u)
17 17
18#endif /* HPUX_C99_INTTYPES_CHECK */ 18#endif /* HPUX_C99_INTTYPES_CHECK */
19
20
21#if defined( HPUX_C99_INTTYPES3_CHECK )
22#undef SIZE_MAX
23#define SIZE_MAX __SIZE_MAX__
24#ifdef __INTPTR_MAX__
25# undef INTPTR_MAX
26# define INTPTR_MAX __INTPTR_MAX__
27# undef INTPTR_MIN
28# define INTPTR_MIN (-INTPTR_MAX - 1)
29#endif
30#ifdef __UINTPTR_MAX__
31# undef UINTPTR_MAX
32# define UINTPTR_MAX __UINTPTR_MAX__
33#endif
34
35#endif /* HPUX_C99_INTTYPES3_CHECK */