From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2C4BC3858024; Mon, 15 Jan 2024 09:38:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C4BC3858024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705311512; bh=5wlDQlXGTpJg4sgO63ZZdjgSMgUC4Hvw8LuY5sPv8go=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WiHHczv29bp84+NYG2kWkrlvJRvrbwjhIox3VQLheE/qOvfnOZuy+Np0jR+lGa0sn 7/kojZRludZeC+I+NTIW973oMW49t9RSY0LO1tp5fvCO/q08r/pbw8iYyCgmDv1Mp9 gL0xfmjXlj0/DbBjHVxG7BJFE/24eajA5AXCddoc= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/113378] _Static_assert diagnostics lack information when compiling stdin Date: Mon, 15 Jan 2024 09:38:31 +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: 13.2.0 X-Bugzilla-Keywords: diagnostic 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=3D113378 --- Comment #5 from Andrew Pinski --- (In reply to Alejandro Colomar from comment #4) >=20 > Not necessarily. I use stdin for simplicity in small tests. The > test suite Which testsuite is this? I should note GCC uses dejagnu (and you can make = your own testsuite using that too for other compilers too) which allows you to do things like: ``` #include int main(void) { unsigned char n; str2i(signed char, &n, "0"); /* { dg-error "-Werror=3Dpointer-sign" } */ } ``` Which is easier to maintain than shell scripts like you provided in comment= #4. Note a simple dejagnu testsuite supports dg-error/dg-warning by default; G= CC's version of dg-error/dg-warning has more features though.=