From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 461C13858D28; Fri, 6 Jan 2023 03:59:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 461C13858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672977571; bh=jr6QxCrIGhUiO1lqf7Tm7Dmy9o3uqDnabkbxQ5obpRQ=; h=From:To:Subject:Date:From; b=fQ1GcP5YQ25OlpaYG2Cah4xqHJpgrQXA1BpZA2klUkSr9Z68B0pujEo8FhUk/v+BM c5I05e9lbpvlZWgljUjrn8zPQqmW3QCKDvQFY+KZqmhosWGwxwOJ2N9tYRHkxfX/Tz ZeiupqxIwdv8/av+P5mzXxt1e1+QnxEQ5z64TWG4= From: "egallager at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108310] New: Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it Date: Fri, 06 Jan 2023 03:59:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic, easyhack X-Bugzilla-Severity: trivial X-Bugzilla-Who: egallager 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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=3D108310 Bug ID: 108310 Summary: Some warnings that -Wtraditional-conversion causes to be emitted aren't actually controlled by it Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: diagnostic, easyhack Severity: trivial Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: egallager at gcc dot gnu.org CC: msebor at gcc dot gnu.org Target Milestone: --- So, I'm having trouble crafting a testcase that properly reproduces this is= sue, but let's see if we can do this just by looking at the source: in gcc/c/c-typeck.cc, starting at line 3464 (as it currently exists), there is= a block of code that emits some warnings from -Wtraditional-conversion: https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dblob;f=3Dgcc/c/c-typeck.cc;h=3De06= f052eb46a72d3d50835330c5af975e7c52084;hb=3DHEAD#l3464 However, instead of being called like: warning_at (ploc, OPT_Wtraditional_conversion, ""); like the rest of the warnings in the area, these two are just called like: warning_at (ploc, 0, ""); This means that when the warning actually gets printed, the flag controlling it, [-Wtraditional-conversion], isn't actually printed alongside it. `git blame` says that Martin Sebor was the last person to touch this code in r9-4484-g550dfbdcf6d93d. I might be able to fix this myself if someone can confirm for me that this is an actual mistake that ought to be fixed (of course, anyone else is welcome to fix it first!).=