From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 091BD3857C4F; Thu, 10 Nov 2022 12:39:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 091BD3857C4F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668083957; bh=nmMtCAFT3vSi+W9F7oyBXSv3wk8cI8WsfLp0kQ9Oi/Q=; h=From:To:Subject:Date:From; b=l61Pd2Mr5xEL0LKCC9YykyRTJzIr+FqJne/LfgpDp7wRHhO6ISjYFZxdFQkWCQPKv 93hEeRfHRyE584FevMQN02e8vWDVMG4JTW2BdXsqkGVbR0tANYP2SRlyJkuU3nzSgc yw2oPFNsHkDYWNHwMm82GkyIiG+xuBA2wkgHkTOk= From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/107611] New: mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7 Date: Thu, 10 Nov 2022 12:39:14 +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: 13.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_gcchost cf_gcctarget cf_gccbuild attachments.created 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107611 Bug ID: 107611 Summary: mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7 Product: gcc Version: 13.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: --- Host: x86_64-apple-darwin11.4.2 Target: x86_64-apple-darwin11.4.2 Build: x86_64-apple-darwin11.4.2 Created attachment 53867 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53867&action=3Dedit Proposed patch When trying to build the current devel/modula-2 branch on Mac OS X 10.7, it failed to compile mc-boot-ch/Gtermios.cc, pge-boot/Gtermios.cc, and gm2-libs-ch/termios.c: /vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/Gtermios.cc: In function = 'int termios_SetFlag(termios*, Flag, int)': /vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/Gtermios.cc:1091:26: erro= r: cannot convert 'tcflag_t*' {aka 'long unsigned int*'} to 'unsigned int*' 1091 | return doSetUnset (&t->c_iflag, IGNBRK, b); | ^~~~~~~~~~~ | | | tcflag_t* {aka long unsigned int*} /vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot-ch/Gtermios.cc:168:27: note:= =20=20 initializing argument 1 of 'int doSetUnset(unsigned int*, unsigned int, int= )' 168 | doSetUnset (unsigned int *bitset, unsigned int mask, int value) |=20=20=20=20=20=20=20=20=20=20=20=20 and many more instances of the same. As the error says, tcflag_t is unsigned long on that Darwin version. The fix is easy: just don't make doSetUnset assume the type of tcflag_t, but use the correct type directly. This is what the attached patch does, which allows the build to continue.=