public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ro at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-107611-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107611 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=53867&action=edit 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: error: 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: initializing argument 1 of 'int doSetUnset(unsigned int*, unsigned int, int)' 168 | doSetUnset (unsigned int *bitset, unsigned int mask, int value) | 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.
next reply other threads:[~2022-11-10 12:39 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-10 12:39 ro at gcc dot gnu.org [this message] 2022-11-10 12:40 ` [Bug modula2/107611] " ro at gcc dot gnu.org 2022-11-11 12:18 ` ro at gcc dot gnu.org 2022-11-24 16:46 ` gaius at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-107611-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).