From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BC16C3858CDA; Tue, 9 Apr 2024 05:20:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC16C3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712640046; bh=rikny3xIAY9UnzgLhOzX2c5dkkDQkHOowY/LjaZPZlY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=k1XGZQFdCFq81exwmCc6l8JRnZyTNe3aO6aSO3Hsg/vL6EeMFx9ahUdvgWVUgGgoG 0APu6y9GNQIuDDW8OF2aJ0XCOWRmh80vuQq62dVTSeGdpiPT6YoRTc7SrDsTtX+G1/ 5Ue2HSzhUO0ln3ZrnzgGM7T4I/Zidn62zFt6dbrk= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/88642] Accepts ill-formed program with invalid scalar initialization syntax. Date: Tue, 09 Apr 2024 05:20:46 +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: 9.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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=3D88642 --- Comment #2 from Andrew Pinski --- We do warn: : In function 'main': :3:5: warning: braces around scalar initializer 3 | int x =3D { { 0 } } ; | ^~~ Maybe this should be a pedantic warning instead ... if (constructor_type !=3D error_mark_node) warning_init (input_location, 0, "braces around scalar initializer"= );=