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

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Rainer Orth <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:b0fb746bf2ff533eccf3a4ea7fbbc02a9a1f8b81

commit r15-9416-gb0fb746bf2ff533eccf3a4ea7fbbc02a9a1f8b81
Author: Rainer Orth <r...@cebitec.uni-bielefeld.de>
Date:   Sun Apr 13 22:48:44 2025 +0200

    cobol: Avoid conflict with OVERFLOW in system headers [PR119217]

    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.

    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.


    2025-04-08  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

            gcc/cobol:
            PR cobol/119217
            * parse.y: Rename OVERFLOW to OVERFLOW_kw.
            Specify type name in %token directive.
            * scan.l: Likewise.
            * token_names.h: Regenerate.

    Co-Authored-By: Simon Sobisch <simonsobi...@gnu.org>

Reply via email to