public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/105390] New: [12 regression] sigfpe redeclared in mc-boot-ch/GSysExceptions.c
@ 2022-04-26 10:45 ro at gcc dot gnu.org
2022-04-26 10:47 ` [Bug modula2/105390] " ro at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ro at gcc dot gnu.org @ 2022-04-26 10:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105390
Bug ID: 105390
Summary: [12 regression] sigfpe redeclared in
mc-boot-ch/GSysExceptions.c
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: ro at gcc dot gnu.org
Target Milestone: ---
Target: *-*-solaris2.11
Building the devel/modula-2 branch on Solaris fails with
/vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/GSysExceptions.c:89:25:
error: 'sigaction sigfpe' redeclared as different kind of entity
89 | static struct sigaction sigfpe;
| ^~~~~~
In file included from
/var/gcc/gcc-12.0.1-20220424/11.4-gm2/prev-gcc/include-fixed/math.h:391,
from
/var/gcc/gcc-12.0.1-20220424/11.4-gm2/prev-sparc-sun-solaris2.11/libstdc++-v3/include/bits/std_abs.h:40,
from
/var/gcc/gcc-12.0.1-20220424/11.4-gm2/prev-sparc-sun-solaris2.11/libstdc++-v3/include/cstdlib:77,
from
/var/gcc/gcc-12.0.1-20220424/11.4-gm2/prev-sparc-sun-solaris2.11/libstdc++-v3/include/stdlib.h:36,
from /vol/gcc/src/hg/master/modula-2/gcc/system.h:265,
from
/vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/GSysExceptions.c:23:
/usr/include/floatingpoint.h:64:28: note: previous declaration 'void (*
sigfpe(sigfpe_code_type, sigfpe_handler_type))()'
64 | extern sigfpe_handler_type sigfpe __P((sigfpe_code_type,
sigfpe_handler_type));
| ^~~~~~
In file included from /usr/include/sys/procset.h:17,
from /usr/include/sys/wait.h:22,
from /usr/include/stdlib.h:16,
from
/var/gcc/gcc-12.0.1-20220424/11.4-gm2/prev-sparc-sun-solaris2.11/libstdc++-v3/include/cstdlib:75:
/vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/GSysExceptions.c: In function
'void SysExceptions_InitExceptionHandlers(void (*)(void*), void (*)(void*),
void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*), void
(*)(void*), void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*),
void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*))':
/vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/GSysExceptions.c:203:10:
error: request for member '_funcptr' in 'sigfpe', which is of non-class type
'void (*(sigfpe_code_type, sigfpe_handler_type))()' {aka 'void (*(int, void
(*)()))()'}
203 | sigfpe.sa_sigaction = sigfpeDespatcher;
| ^~~~~~~~~~~~
/vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/GSysExceptions.c:204:10:
error: request for member 'sa_flags' in 'sigfpe', which is of non-class type
'void (*(sigfpe_code_type, sigfpe_handler_type))()' {aka 'void (*(int, void
(*)()))()'}
204 | sigfpe.sa_flags = (SA_SIGINFO);
| ^~~~~~~~
/vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/GSysExceptions.c:205:24:
error: request for member 'sa_mask' in 'sigfpe', which is of non-class type
'void (*(sigfpe_code_type, sigfpe_handler_type))()' {aka 'void (*(int, void
(*)()))()'}
205 | sigemptyset (&sigfpe.sa_mask);
| ^~~~~~~
/vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/GSysExceptions.c:207:26:
error: cannot convert 'void (* (*)(sigfpe_code_type, sigfpe_handler_type))()'
{aka 'void (* (*)(int, void (*)()))()'} to 'const sigaction*'
207 | if (sigaction (SIGFPE, &sigfpe, &old) != 0)
| ^~~~~~~
| |
| void (* (*)(sigfpe_code_type,
sigfpe_handler_type))() {aka void (* (*)(int, void (*)()))()}
In file included from /vol/gcc/src/hg/master/modula-2/gcc/system.h:432:
/usr/include/signal.h:46:27: note: initializing argument 2 of 'int
sigaction(int, const sigaction*, sigaction*)'
46 | extern int sigaction(int, const struct sigaction *_RESTRICT_KYWD,
| ^
The same issue exists in gm2-libs-ch/SysExceptions.c.
I've worked around this by renaming sigfpe to sigfpe_.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug modula2/105390] [12 regression] sigfpe redeclared in mc-boot-ch/GSysExceptions.c
2022-04-26 10:45 [Bug modula2/105390] New: [12 regression] sigfpe redeclared in mc-boot-ch/GSysExceptions.c ro at gcc dot gnu.org
@ 2022-04-26 10:47 ` ro at gcc dot gnu.org
2022-04-26 12:37 ` rguenth at gcc dot gnu.org
2022-04-29 10:06 ` [Bug modula2/105390] [12/13 " gaius at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ro at gcc dot gnu.org @ 2022-04-26 10:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105390
--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 52882
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52882&action=edit
Hacky patch.
I've only now noticed that the mechanical sigfpe -> sigfpe_ change shouldn't
have
been applied to sigfpeDespatcher, but I'm leaving the patch as is since that's
what allowed the build to continue.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug modula2/105390] [12 regression] sigfpe redeclared in mc-boot-ch/GSysExceptions.c
2022-04-26 10:45 [Bug modula2/105390] New: [12 regression] sigfpe redeclared in mc-boot-ch/GSysExceptions.c ro at gcc dot gnu.org
2022-04-26 10:47 ` [Bug modula2/105390] " ro at gcc dot gnu.org
@ 2022-04-26 12:37 ` rguenth at gcc dot gnu.org
2022-04-29 10:06 ` [Bug modula2/105390] [12/13 " gaius at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-26 12:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105390
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Priority|P3 |P4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug modula2/105390] [12/13 regression] sigfpe redeclared in mc-boot-ch/GSysExceptions.c
2022-04-26 10:45 [Bug modula2/105390] New: [12 regression] sigfpe redeclared in mc-boot-ch/GSysExceptions.c ro at gcc dot gnu.org
2022-04-26 10:47 ` [Bug modula2/105390] " ro at gcc dot gnu.org
2022-04-26 12:37 ` rguenth at gcc dot gnu.org
@ 2022-04-29 10:06 ` gaius at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: gaius at gcc dot gnu.org @ 2022-04-29 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105390
Gaius Mulley <gaius at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Many thanks for the patch - applied now to the gcc-12 modula2 branch (without
the sigfpeDespatcher as observed) and I've updated mc to avoid sigfpe.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-29 10:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 10:45 [Bug modula2/105390] New: [12 regression] sigfpe redeclared in mc-boot-ch/GSysExceptions.c ro at gcc dot gnu.org
2022-04-26 10:47 ` [Bug modula2/105390] " ro at gcc dot gnu.org
2022-04-26 12:37 ` rguenth at gcc dot gnu.org
2022-04-29 10:06 ` [Bug modula2/105390] [12/13 " gaius at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).