From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C6C413858C52; Fri, 23 Sep 2022 13:18:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C6C413858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663939080; bh=QnnWLnUIjVyvt6v0CFhPo2uRVixxNfwTSYUtSHB/T9U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xaEmvvsg74bhkugSOc0TmSnDKyTLzd2JpfRQShbNSUAmJi0JY7guu42nJ0u7iatih 5uRZoaZJrJOC+h7OFnf8HORCAh2aqShP2qqdobh54AinkBeBRYdwGoWxFQyDvQ4IKc iMcpLOm0zVWDIzrnztGDoVQwpgB4vYfY1J4vGKIk= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/48839] #error should terminate compilation - similar to missing #include Date: Fri, 23 Sep 2022 13:18:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 4.6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com 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=3D48839 --- Comment #11 from Jonathan Wakely --- (In reply to Paolo Carlini from comment #8) > about the other compilers? For sure some are following the current gcc > behaviour, for compatibility, I suspect ICC for example. Should we also h= ave > a command line switch? Probably missing #includes just unconditionally end > the compilation on most compilers, though. Well, it's also true that the = so > called workaround which I mentioned in Comment #1 works pretty well and we > do have *very* few fatal errors in the front ends... Clang keeps going, like GCC. ICC seems to as well. But EDG stops immediately with a "catastrophic error": "foo.cc", line 1: catastrophic error: #error directive: NOPE Anyway, I don't think compatibility is an issue. We're not going to produce= any assembly or other output, compilation fails.=