diff options
author | Richard Biener <rguenther@suse.de> | 2025-03-19 15:09:03 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2025-03-21 10:05:46 +0100 |
commit | a62893d71c5f48fd7780957e1ad1a4f38f351728 (patch) | |
tree | 5f995d84b47f50931c03aaa5d53608fc514e3c6b /gcc/cobol/util.cc | |
parent | 0f344846a62c8863375909d8d6b435b4b5fd35a0 (diff) | |
download | gcc-a62893d71c5f48fd7780957e1ad1a4f38f351728.zip gcc-a62893d71c5f48fd7780957e1ad1a4f38f351728.tar.gz gcc-a62893d71c5f48fd7780957e1ad1a4f38f351728.tar.bz2 |
make sources coretypes.h and tree.h clean
The following removes HOWEVER_GCC_DEFINES_TREE and the alternate
definition of tree from symbols.h and instead ensures that both
coretypes.h and tree.h are included where required. This required
putting GCCs own 'NONE' in a scoped enum (see separate patch) and
renaming the cobol use of UNSIGNED, SIGNED and BLOCK which conflict
with enums from tree.h.
There's a few things in conflict with options.h defines, notably
cobol_dialect and cobol_exceptions but also yy_flex_debug (wherever
that comes from). I've chosen to simply #undef those where
appropriate. I've refrained from putting the coretypes.h and
tree.h includes in cobol-system.h since not all files require this.
This helps in making use of real.h instead of using _Float128.
PR cobol/119241
gcc/cobol/
* symbols.h: Do not typedef tree.
* cdf.y: Include coretypes.h and tree.h.
* symbols.cc: Likewise.
* symfind.cc: Likewise.
* util.cc: Likewise.
* parse.y: Include coretypes.h and tree.h where appropriate.
Rename BLOCK to COB_BLOCK, SIGNED to COB_SIGNED, UNSIGNED
to COB_UNSIGNED.
* scan.l: Likewise.
* token_names.h: Likewise.
* cobol1.cc: Do not define HOWEVER_GCC_DEFINES_TREE.
* except.cc: Likewise.
* genapi.cc: Likewise.
* gengen.cc: Likewise.
* genmath.cc: Likewise.
* genutil.cc: Likewise.
* structs.cc: Likewise.
Diffstat (limited to 'gcc/cobol/util.cc')
-rw-r--r-- | gcc/cobol/util.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cobol/util.cc b/gcc/cobol/util.cc index 101a0a0..1c0810b 100644 --- a/gcc/cobol/util.cc +++ b/gcc/cobol/util.cc @@ -35,6 +35,10 @@ */ #include "cobol-system.h" +#include "coretypes.h" +#include "tree.h" +#undef yy_flex_debug + #include <langinfo.h> #include "coretypes.h" @@ -55,7 +59,6 @@ #include "cbldiag.h" #include "lexio.h" -#define HOWEVER_GCC_DEFINES_TREE #include "../../libgcobol/ec.h" #include "../../libgcobol/common-defs.h" #include "symbols.h" |