From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6B0F03858400; Wed, 29 Dec 2021 23:38:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B0F03858400 From: "carlosgalvezp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103862] New: Regression: -Wold-style-cast warns about system macros Date: Wed, 29 Dec 2021 23:38:53 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlosgalvezp at gmail dot com 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: Wed, 29 Dec 2021 23:38:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103862 Bug ID: 103862 Summary: Regression: -Wold-style-cast warns about system macros Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: carlosgalvezp at gmail dot com Target Milestone: --- Hi, I thought this problem was solved by reading this:=20 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D12258 But I can still find it on GCC 11.1: // include/third_party.h #pragma once #define MY_CAST(x) ((int)x) // main.cpp #include int main()=20 { int x =3D MY_CAST(123); return x; } # g++-11 -isystem include -Wold-style-cast main.cpp In file included from main.cpp:1: main.cpp: In function 'int main()': main.cpp:5:21: warning: use of old-style cast to 'int' [-Wold-style-cast] 5 | int x =3D MY_CAST(123); | ^~~ # g++-11 --version g++-11 (Ubuntu 11.1.0-1ubuntu1~20.04) 11.1.0=