public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/101388] New: Unconditional use of __MAX_BAUD
@ 2021-07-09 12:18 ro at gcc dot gnu.org
  2021-08-15 13:38 ` [Bug modula2/101388] " gaiusmod2 at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2021-07-09 12:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101388
           Summary: Unconditional use of __MAX_BAUD
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: gaiusmod2 at gmail dot com
  Target Milestone: ---
            Target: *-*-solaris2.11

Building the devel/modula-2 branch on Solaris 11 fails with undefined
references
to __MAX_BAUD in two places:

/vol/gcc/src/git/modula-2/gcc/m2/mc-boot-ch/Gtermios.c: In function
'termios_GetFlag':
/vol/gcc/src/git/modula-2/gcc/m2/mc-boot-ch/Gtermios.c:872:27: error:
'__MAX_BAUD' undeclared (first use in this function)
       *b = ((t->c_cflag & __MAX_BAUD) == __MAX_BAUD);
                           ^~~~~~~~~~

/vol/gcc/src/git/modula-2/gcc/m2/gm2-libs-ch/termios.c: In function
'termios_GetFlag':
/vol/gcc/src/git/modula-2/gcc/m2/gm2-libs-ch/termios.c:877:27: error:
'__MAX_BAUD' undeclared (first use in this function)
  877 |       *b = ((t->c_cflag & __MAX_BAUD) == __MAX_BAUD);
      |                           ^~~~~~~~~~
__MAX_BAUD seems to be Linux/glibc specific, but the current problem is
obviously
cause by a wrong guard which checks for defined(MAX) instead of
defined(__MAX_BAUD).

Correcting this lets the build continue.

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

* [Bug modula2/101388] Unconditional use of __MAX_BAUD
  2021-07-09 12:18 [Bug modula2/101388] New: Unconditional use of __MAX_BAUD ro at gcc dot gnu.org
@ 2021-08-15 13:38 ` gaiusmod2 at gmail dot com
  2021-08-15 21:29 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: gaiusmod2 at gmail dot com @ 2021-08-15 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Gaius Mulley <gaiusmod2 at gmail dot com> ---
"ro at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> writes:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101388
>
>             Bug ID: 101388
>            Summary: Unconditional use of __MAX_BAUD
>            Product: gcc
>            Version: 12.0
>             Status: UNCONFIRMED
>           Severity: normal
>           Priority: P3
>          Component: modula2
>           Assignee: unassigned at gcc dot gnu.org
>           Reporter: ro at gcc dot gnu.org
>                 CC: gaiusmod2 at gmail dot com
>   Target Milestone: ---
>             Target: *-*-solaris2.11
>
> Building the devel/modula-2 branch on Solaris 11 fails with undefined
> references
> to __MAX_BAUD in two places:
>
> /vol/gcc/src/git/modula-2/gcc/m2/mc-boot-ch/Gtermios.c: In function
> 'termios_GetFlag':
> /vol/gcc/src/git/modula-2/gcc/m2/mc-boot-ch/Gtermios.c:872:27: error:
> '__MAX_BAUD' undeclared (first use in this function)
>        *b = ((t->c_cflag & __MAX_BAUD) == __MAX_BAUD);
>                            ^~~~~~~~~~
>
> /vol/gcc/src/git/modula-2/gcc/m2/gm2-libs-ch/termios.c: In function
> 'termios_GetFlag':
> /vol/gcc/src/git/modula-2/gcc/m2/gm2-libs-ch/termios.c:877:27: error:
> '__MAX_BAUD' undeclared (first use in this function)
>   877 |       *b = ((t->c_cflag & __MAX_BAUD) == __MAX_BAUD);
>       |                           ^~~~~~~~~~
> __MAX_BAUD seems to be Linux/glibc specific, but the current problem is
> obviously
> cause by a wrong guard which checks for defined(MAX) instead of
> defined(__MAX_BAUD).
>
> Correcting this lets the build continue.

many thanks for the report - now fixed in the git repro,


regards,
Gaius

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

* [Bug modula2/101388] Unconditional use of __MAX_BAUD
  2021-07-09 12:18 [Bug modula2/101388] New: Unconditional use of __MAX_BAUD ro at gcc dot gnu.org
  2021-08-15 13:38 ` [Bug modula2/101388] " gaiusmod2 at gmail dot com
@ 2021-08-15 21:29 ` pinskia at gcc dot gnu.org
  2021-09-14 10:05 ` ro at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-15 21:29 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

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

* [Bug modula2/101388] Unconditional use of __MAX_BAUD
  2021-07-09 12:18 [Bug modula2/101388] New: Unconditional use of __MAX_BAUD ro at gcc dot gnu.org
  2021-08-15 13:38 ` [Bug modula2/101388] " gaiusmod2 at gmail dot com
  2021-08-15 21:29 ` pinskia at gcc dot gnu.org
@ 2021-09-14 10:05 ` ro at gcc dot gnu.org
  2021-09-14 10:08 ` ro at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2021-09-14 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 51458
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51458&action=edit
Missed part of patch

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

* [Bug modula2/101388] Unconditional use of __MAX_BAUD
  2021-07-09 12:18 [Bug modula2/101388] New: Unconditional use of __MAX_BAUD ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-09-14 10:05 ` ro at gcc dot gnu.org
@ 2021-09-14 10:08 ` ro at gcc dot gnu.org
  2021-10-13 17:04 ` gaiusmod2 at gmail dot com
  2022-01-18 11:32 ` gaius at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2021-09-14 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2021-09-14
         Resolution|FIXED                       |---
     Ever confirmed|0                           |1

--- Comment #4 from Rainer Orth <ro at gcc dot gnu.org> ---
When I tried a fresh build on i386-pc-solaris2.11 yesterday, it turned out that
the fix hadn't been complete:

/vol/gcc/src/git/modula-2/gcc/m2/gm2-libs-ch/termios.c: In function
'termios_GetFlag':
/vol/gcc/src/git/modula-2/gcc/m2/gm2-libs-ch/termios.c:877:27: error:
'__MAX_BAUD' undeclared (first use in this function)
  877 |       *b = ((t->c_cflag & __MAX_BAUD) == __MAX_BAUD);
      |                           ^~~~~~~~~~

I'm attaching the patch that allowed me to finish the build.

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

* [Bug modula2/101388] Unconditional use of __MAX_BAUD
  2021-07-09 12:18 [Bug modula2/101388] New: Unconditional use of __MAX_BAUD ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-09-14 10:08 ` ro at gcc dot gnu.org
@ 2021-10-13 17:04 ` gaiusmod2 at gmail dot com
  2022-01-18 11:32 ` gaius at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: gaiusmod2 at gmail dot com @ 2021-10-13 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Gaius Mulley <gaiusmod2 at gmail dot com> ---
Many thanks - I've applied the patch to the git repro.  Fixed now I believe.

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

* [Bug modula2/101388] Unconditional use of __MAX_BAUD
  2021-07-09 12:18 [Bug modula2/101388] New: Unconditional use of __MAX_BAUD ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-10-13 17:04 ` gaiusmod2 at gmail dot com
@ 2022-01-18 11:32 ` gaius at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2022-01-18 11:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Marking as resolved as the patch has been applied.

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

end of thread, other threads:[~2022-01-18 11:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 12:18 [Bug modula2/101388] New: Unconditional use of __MAX_BAUD ro at gcc dot gnu.org
2021-08-15 13:38 ` [Bug modula2/101388] " gaiusmod2 at gmail dot com
2021-08-15 21:29 ` pinskia at gcc dot gnu.org
2021-09-14 10:05 ` ro at gcc dot gnu.org
2021-09-14 10:08 ` ro at gcc dot gnu.org
2021-10-13 17:04 ` gaiusmod2 at gmail dot com
2022-01-18 11:32 ` 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).