From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D38538582A5; Fri, 12 Jan 2024 14:36:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D38538582A5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705070169; bh=sF4y69Q/Etn5avm9uOzNR4ya+R8l2SIdFehcy7/Ck/0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LGssVTS1L6nAyWudOMx/hy5HSA9fMqm6JGl3gAsSfxT41Xq9Ccer+hrewQ/Iya78K J+MSE2D0LdT6gLJE6xR183qzyM2W3PAHymOM7S7MWPujzdCC+uwmV8Wv7nm3wKEBwF 84bA92+tA8zEkeJgEIVw23xEMEI2KyKyzJg8K6uI= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/89072] -Wall -Werror should be defaults Date: Fri, 12 Jan 2024 14:36:07 +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: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D89072 --- Comment #4 from Segher Boessenkool --- (In reply to Xi Ruoyao from comment #3) > In GCC 14 several warnings will be turned to errors by default with C99 o= r a > newer C standard. But generally -Werror should *never* be the default.=20 > Besides the reasons Segher and Rich have already given, the standard also > disallows the compiler from randomly rejecting code just because it "looks > suspicious". Huh? Where does the standard require that? The closest to it is 4/8: "An= =20 implementation shall be accompanied by a document that defines all implementation-defined and locale-specific characteristics and all extensions." which essentially *allows* such restrictions. It just has to be documented. Of course a good implementation will not reject valid code without a very good reason to do that.=