diff options
author | Gaius Mulley <(no_default)> | 2024-03-28 14:57:49 +0000 |
---|---|---|
committer | Gaius Mulley <(no_default)> | 2024-03-28 14:57:49 +0000 |
commit | 04799f03e8d01b903295ef3a100a0117b7ddbf5e (patch) | |
tree | 18e5d0435fe934fae1e540a003445a00f0da84c6 /libiberty | |
parent | 44ab31419cf366e889a019a2fe31638c6f093729 (diff) | |
download | gcc-04799f03e8d01b903295ef3a100a0117b7ddbf5e.zip gcc-04799f03e8d01b903295ef3a100a0117b7ddbf5e.tar.gz gcc-04799f03e8d01b903295ef3a100a0117b7ddbf5e.tar.bz2 |
PR modula2/114517 gm2 does not allow comparison operator hash in column one
This patch allows -fno-cpp to be supplied to gm2. Without this patch
it causes an ICE. The patch allows -fno-cpp to turn off cpp flags.
These are tested in m2.flex to decide whether a change of state is
allowed (enabling handling of #line directives).
gcc/ChangeLog:
PR modula2/114517
* doc/gm2.texi: Mention gm2 treats a # in the first column
as a preprocessor directive unless -fno-cpp is supplied.
gcc/m2/ChangeLog:
PR modula2/114517
* gm2-compiler/M2Options.def (SetCpp): Add comment.
(GetCpp): Move after SetCpp.
(GetLineDirectives): New procedure function.
* gm2-compiler/M2Options.mod (GetLineDirectives): New
procedure function.
* gm2-gcc/m2options.h (M2Options_GetLineDirectives): New
prototype.
* gm2-lang.cc (gm2_langhook_init_options): OPT_fcpp only
assert if !value.
* m2.flex: Test GetLineDirectives before changing to LINE0
state.
gcc/testsuite/ChangeLog:
PR modula2/114517
* gm2/cpp/fail/hashfirstcolumn2.mod: New test.
* gm2/imports/fail/imports-fail.exp: New test.
* gm2/imports/fail/localmodule2.mod: New test.
* gm2/imports/run/pass/localmodule.mod: New test.
Signed-off-by: Gaius Mulley <(no_default)>
Diffstat (limited to 'libiberty')
0 files changed, 0 insertions, 0 deletions