On Fri, Apr 11, 2025 at 11:03 AM Rainer Orth
<r...@cebitec.uni-bielefeld.de> wrote:
>
> parse.h causes the COBOL build to break on Solaris:
>
> cobol/parse.h:356:5: error: expected identifier before numeric constant
>   356 |     OVERFLOW = 305,                /* OVERFLOW  */
>       |     ^~~~~~~~
>
> The problem is that <math.h> has
>
> #define OVERFLOW        3
>
> To avoid the conflict, this patch renames OVERFLOW to OVERFLOW_kw,
> following existing praxis.
>
> I wonder if such a * -> *_kw rename should be done globally instead on a
> case-by-case basis?
>
> Btw., token_names.h has a comment claiming
>
> // generated by ./token_names.h.gen ../../build/gcc/cobol/parse.h
>
> but there's no token_names.h.gen anywhere in the tree, so I've updated
> the file manually.
>
> Bootstrapped without regressions on amd64-pc-solaris2.11,
> sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.
>
> Ok for trunk?

OK.

>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2025-04-08  Rainer Orth  <r...@cebitec.uni-bielefeld.de>
>
>         gcc/cobol:
>         PR cobol/119217
>         * parse.y: Rename OVERFLOW to OVERFLOW_kw.
>         * scan.l: Likewise.
>         * token_names.h: Regenerate.
>

Reply via email to