From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 472A63854154; Mon, 31 Oct 2022 12:34:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 472A63854154 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667219662; bh=aBQIaPRT8iShus2vVMRM377cl+tf3w70otn3wwUcJGI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eCtTAAG8tbHFhDOuhNRuAcRvC3Wc0Kw1mfXUNvUW/5XGpH3U2AHY5JMggAqmMA3Zc zsPtD+hGAuu2VmiyCeJQLzsZLu/uLyjCBxy8eB4pHzFhQwvyGEhkgSFHW+mpn5VYB8 YIev83HjtUlh9Pdzhh32CdKlmNqDitiywjKbgW8I= From: "vincent-gcc at vinc17 dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/105499] inconsistency between -Werror=c++-compat and g++ in __extension__ block Date: Mon, 31 Oct 2022 12:34:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 11.3.0 X-Bugzilla-Keywords: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: vincent-gcc at vinc17 dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D105499 --- Comment #5 from Vincent Lef=C3=A8vre --- (In reply to Andrew Pinski from comment #4) > __extension__ disables all compatibility warnings. >=20 > This is by design really as headers sometimes needs to be written using C > code and need to turn off these warnings.=20 I don't understand why. If the code is designed only for C (i.e. it will not work with a C++ compiler), then the C++ compatibility option is not needed = to test the code. Otherwise, the code is buggy, so the compatibility warning is useful.=