From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 301F43858D28; Thu, 26 Jan 2023 12:26:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 301F43858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674735984; bh=ZuRiAUHqzcZVdkE/Z8+aAmT1s4MHpNeNCeGGvHQXQrM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EI3b4+/fWoFpWLdS7OJCJPU2SEKIXjoJstNlBJaE7L+6grcd2wM/bTaPpIdarJLZT lELEM7QkikWyAaR/fXuV+rWsyeD2NTOAFBlaQ/x2H87G3FKKg8Wo1O7k+E0UUQrMUM JazRb/5sAC8WJbwm5wig1iD2lJf5aeSE3cU0zkX8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108555] gm2_langhook_option_lang_mask causes all (unappropriate) C language options to be recognized Date: Thu, 26 Jan 2023 12:26:23 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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=3D108555 --- Comment #3 from Richard Biener --- (In reply to Iain Sandoe from comment #2) > We do claim the ones that modula-2 actually uses in gm2-lang.opt >=20 > (previous to r13-5373-g80cf2c5e8f496b we had a large and growing set to > accommodate everything that the preprocessor needs). >=20 > Because of that growing number of added options, this change was made > intentionally... the idea was to claim and act on the C and Driver ones t= hat > are used to construct C-preprocessor command lines as an action separate > from handling the Modula-2 options. >=20 > IIUC, the mechanism of adding them to the language opt is a convention > rather than a correctness issue? Kind-of ... > Or is it that we should reject rather than ignoring the options that we do > not pass to the preprocessor? ... yes, you are short-cutting generic code that diagnoses and removes unappropriate options, I'm not sure simulating that behavior is easily possible. > (I can revert to adding everything to the gm2-lang.opt .. it just seemed a > bit hacky)=