From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C582F3858D3C; Sun, 30 Jan 2022 13:06:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C582F3858D3C From: "eric.pouech at orange dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/104289] New: -fdiagnostics-parseable-fixits doesn't always generate fixit notes Date: Sun, 30 Jan 2022 13:06:55 +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: 11.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eric.pouech at orange dot fr 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 bug_severity priority component assigned_to reporter 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2022 13:06:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104289 Bug ID: 104289 Summary: -fdiagnostics-parseable-fixits doesn't always generate fixit notes Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: eric.pouech at orange dot fr Target Milestone: --- [eric]$ cat b2.c #include #define foo(x...) printf(x); int main(void) { long l =3D 0; foo("this is a" "long line: %d\n", l);=20=20=20=20=20=20=20=20=20=20=20=20=20=20 return 0; } [eric]$ LC_ALL=3DC gcc -Wall -fdiagnostics-parseable-fixits -c b2.c b2.c: In function 'main': b2.c:8:9: warning: format '%d' expects argument of type 'int', but argument= 2 has type 'long int' [-Wformat=3D] 8 | foo("this is a" | ^~~~~~~~~~~ 9 | "long line: %d\n", l); | ~ | | | long int b2.c:3:26: note: in definition of macro 'foo' 3 | #define foo(x...) printf(x); | ^ I'm expecting a fixit note to be present. Note: the same snipnet without the multi line string, or the macro work as expected.=