From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 13F2C3858D37; Tue, 26 Apr 2022 10:45:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13F2C3858D37 From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/105390] New: [12 regression] sigfpe redeclared in mc-boot-ch/GSysExceptions.c Date: Tue, 26 Apr 2022 10:45:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2022 10:45:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105390 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 func= tion 'void SysExceptions_InitExceptionHandlers(void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*), void (*)(void*), void (*)(voi= d*), 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 =3D 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 =3D (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) !=3D 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_.=