Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
793146e3
Commit
793146e3
authored
Jan 20, 2004
by
Bruce Korb
Committed by
Bruce Korb
Jan 20, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorder struct exception hacks and only bypass glibc for proper C++ handling
From-SVN: r76240
parent
fdb33708
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
76 deletions
+88
-76
gcc/ChangeLog
+6
-0
gcc/fixinc/fixincl.x
+51
-51
gcc/fixinc/inclhack.def
+31
-25
No files found.
gcc/ChangeLog
View file @
793146e3
2004-01-20 Bruce Korb <bkorb@gnu.org>
* fixinc/inclhack.def(math_exception): bypass only for glibc.
(matherr_decl): rename & relocate as exception_structure.
This fix must precede the math_exception fix.
2004-01-20 Roger Sayle <roger@eyesopen.com>
* fold-const.c (fold_convert): Rename to fold_convert_const.
...
...
gcc/fixinc/fixincl.x
View file @
793146e3
...
...
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Tuesday
December 23, 2003 at 01:59:31 PM ME
T
* It has been AutoGen-ed Tuesday
January 20, 2004 at 03:43:24 PM PS
T
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT CVS-MERGE THIS FILE, EITHER Tue
Dec 23 13:59:32 MET 2003
/* DO NOT CVS-MERGE THIS FILE, EITHER Tue
Jan 20 15:43:24 PST 2004
*
* You must regenerate it. Use the ./genfixes script.
*
...
...
@@ -1751,6 +1751,48 @@ static const char* apzEcd_CursorPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Exception_Structure fix
*/
tSCC zException_StructureName[] =
"exception_structure";
/*
* File name selection pattern
*/
tSCC zException_StructureList[] =
"|math.h|";
/*
* Machine/OS name selection pattern
*/
#define apzException_StructureMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zException_StructureSelect0[] =
"matherr";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zException_StructureBypass0[] =
"matherr.*(struct exception|__MATH_EXCEPTION)";
#define EXCEPTION_STRUCTURE_TEST_CT 2
static tTestDesc aException_StructureTests[] = {
{ TT_NEGREP, zException_StructureBypass0, (regex_t*)NULL },
{ TT_EGREP, zException_StructureSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Exception_Structure
*/
static const char* apzException_StructurePatch[] = {
"wrap",
"struct exception;\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Freebsd_Gcc3_Breakage fix
*/
tSCC zFreebsd_Gcc3_BreakageName[] =
...
...
@@ -3294,7 +3336,7 @@ tSCC zMath_ExceptionSelect0[] =
* content bypass pattern - skip fix if pattern found
*/
tSCC zMath_ExceptionBypass0[] =
"
__cplusplus
";
"
We have a problem when using C\\+\\+
";
#define MATH_EXCEPTION_TEST_CT 2
static tTestDesc aMath_ExceptionTests[] = {
...
...
@@ -4982,48 +5024,6 @@ void\t(*signal(...))(...);\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sunos_Matherr_Decl fix
*/
tSCC zSunos_Matherr_DeclName[] =
"sunos_matherr_decl";
/*
* File name selection pattern
*/
tSCC zSunos_Matherr_DeclList[] =
"|math.h|";
/*
* Machine/OS name selection pattern
*/
#define apzSunos_Matherr_DeclMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSunos_Matherr_DeclSelect0[] =
"matherr";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zSunos_Matherr_DeclBypass0[] =
"matherr.*(struct exception|__MATH_EXCEPTION)";
#define SUNOS_MATHERR_DECL_TEST_CT 2
static tTestDesc aSunos_Matherr_DeclTests[] = {
{ TT_NEGREP, zSunos_Matherr_DeclBypass0, (regex_t*)NULL },
{ TT_EGREP, zSunos_Matherr_DeclSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Sunos_Matherr_Decl
*/
static const char* apzSunos_Matherr_DeclPatch[] = {
"wrap",
"struct exception;\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sunos_Strlen fix
*/
tSCC zSunos_StrlenName[] =
...
...
@@ -6577,6 +6577,7 @@ typedef enum {
DEC_INTERN_ASM_FIXIDX,
DJGPP_WCHAR_H_FIXIDX,
ECD_CURSOR_FIXIDX,
EXCEPTION_STRUCTURE_FIXIDX,
FREEBSD_GCC3_BREAKAGE_FIXIDX,
GNU_TYPES_FIXIDX,
HP_INLINE_FIXIDX,
...
...
@@ -6660,7 +6661,6 @@ typedef enum {
SUN_MALLOC_FIXIDX,
SUN_RUSERS_SEMI_FIXIDX,
SUN_SIGNAL_FIXIDX,
SUNOS_MATHERR_DECL_FIXIDX,
SUNOS_STRLEN_FIXIDX,
SVR4__P_FIXIDX,
SVR4_DISABLE_OPT_FIXIDX,
...
...
@@ -6909,6 +6909,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ECD_CURSOR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aEcd_CursorTests, apzEcd_CursorPatch, 0 },
{ zException_StructureName, zException_StructureList,
apzException_StructureMachs,
EXCEPTION_STRUCTURE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aException_StructureTests, apzException_StructurePatch, 0 },
{ zFreebsd_Gcc3_BreakageName, zFreebsd_Gcc3_BreakageList,
apzFreebsd_Gcc3_BreakageMachs,
FREEBSD_GCC3_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
...
...
@@ -7324,11 +7329,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SUN_SIGNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSun_SignalTests, apzSun_SignalPatch, 0 },
{ zSunos_Matherr_DeclName, zSunos_Matherr_DeclList,
apzSunos_Matherr_DeclMachs,
SUNOS_MATHERR_DECL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSunos_Matherr_DeclTests, apzSunos_Matherr_DeclPatch, 0 },
{ zSunos_StrlenName, zSunos_StrlenList,
apzSunos_StrlenMachs,
SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
...
...
gcc/fixinc/inclhack.def
View file @
793146e3
...
...
@@ -1056,6 +1056,26 @@ fix = {
/*
* math.h on SunOS 4 puts the declaration of matherr before the definition
* of struct exception, so the prototype (added by fixproto) causes havoc.
* This must appear before the math_exception fix.
*/
fix = {
hackname = exception_structure;
files = math.h;
/* If matherr has a prototype already, the header needs no fix. */
bypass = 'matherr.*(struct exception|__MATH_EXCEPTION)';
select = matherr;
c_fix = wrap;
c_fix_arg = "struct exception;\n";
test_text = "extern int matherr();";
};
/*
* Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume
* neither the existence of GCC 3 nor its exact feature set yet break
* (by design?) when __GNUC__ is set beyond 2.
...
...
@@ -1856,11 +1876,10 @@ fix = {
/*
* Some math.h files define struct exception (it's in the System V
* Interface Definition), which conflicts with
* the class exception defined in the C++ file std/stdexcept.h. We
* redefine it to __math_exception. This is not a great fix, but I
* haven't been able to think of anything better.
* Note that we have to put the #ifdef/#endif blocks at beginning
* Interface Definition), which conflicts with the class exception defined
* in the C++ file std/stdexcept.h. We redefine it to __math_exception.
* This is not a great fix, but I haven't been able to think of anything
* better. Note that we have to put the #ifdef/#endif blocks at beginning
* and end of file, because fixproto runs after us and may insert
* additional references to struct exception.
*/
...
...
@@ -1868,7 +1887,13 @@ fix = {
hackname = math_exception;
files = math.h;
select = "struct exception";
bypass = '__cplusplus';
/*
* This should be bypassed on __cplusplus, but some supposedly C++ C++
* aware headers, such as Solaris 8 and 9, don't wrap their struct
* exception either. So currently we bypass only for glibc, based on a
* comment in the fixed glibc header. Ick.
*/
bypass = 'We have a problem when using C\+\+';
c_fix = wrap;
c_fix_arg = "#ifdef __cplusplus\n"
...
...
@@ -2809,25 +2834,6 @@ fix = {
/*
* math.h on SunOS 4 puts the declaration of matherr before the definition
* of struct exception, so the prototype (added by fixproto) causes havoc.
*/
fix = {
hackname = sunos_matherr_decl;
files = math.h;
/* If matherr has a prototype already, the header needs no fix. */
bypass = 'matherr.*(struct exception|__MATH_EXCEPTION)';
select = matherr;
c_fix = wrap;
c_fix_arg = "struct exception;\n";
test_text = "extern int matherr();";
};
/*
* Correct the return type for strlen in strings.h in SunOS 4.
*/
fix = {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment