public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/107611] New: mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7
@ 2022-11-10 12:39 ro at gcc dot gnu.org
  2022-11-10 12:40 ` [Bug modula2/107611] " 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-11-10 12:39 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug modula2/107611] mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7
  2022-11-10 12:39 [Bug modula2/107611] New: mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7 ro at gcc dot gnu.org
@ 2022-11-10 12:40 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: ro at gcc dot gnu.org @ 2022-11-10 12:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107611

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug modula2/107611] mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7
  2022-11-10 12:39 [Bug modula2/107611] New: mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7 ro at gcc dot gnu.org
  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
  2 siblings, 0 replies; 4+ messages in thread
From: ro at gcc dot gnu.org @ 2022-11-11 12:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107611

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #53867|0                           |1
        is obsolete|                            |

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 53880
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53880&action=edit
Revised patch

libgm2/libm2pim/termios.cc has the same issue.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug modula2/107611] mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7
  2022-11-10 12:39 [Bug modula2/107611] New: mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7 ro at gcc dot gnu.org
  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
  2 siblings, 0 replies; 4+ messages in thread
From: gaius at gcc dot gnu.org @ 2022-11-24 16:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107611

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Many thanks - applying patch!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-24 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 12:39 [Bug modula2/107611] New: mc-boot-ch/Gtermios.cc etc. don't compile on Mac OS X 10.7 ro at gcc dot gnu.org
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

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).