From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BD6073858D3C; Thu, 28 Mar 2024 14:58:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD6073858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711637917; bh=waj3PTY5DKgAZ7/bebU6rl2JQponEzaQcotkPYZnj2U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EB490jRRJVbC1c87WNyczWzJ32m8jk+31n1if1VbpZrRXvSZcT8QAvPhyrfFqsrth UmR6jA0W6Xe0Y4mYEx9v93XA98/I4kzjxnnZVTmpNUvs+tkO+YDrnVMS8dk4L9ZjVn ppB0dAq4dDZs7r60WFdFWLd73gPAIrpfWDfA7tzY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/114517] gm2 does not allow comparion operator # in the first column Date: Thu, 28 Mar 2024 14:58:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114517 --- Comment #1 from GCC Commits --- The master branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:04799f03e8d01b903295ef3a100a0117b7ddbf5e commit r14-9709-g04799f03e8d01b903295ef3a100a0117b7ddbf5e Author: Gaius Mulley <(no_default)> Date: Thu Mar 28 14:57:49 2024 +0000 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)>=