From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A0E0D385AC3C; Sun, 31 Jul 2022 08:44:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0E0D385AC3C From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106416] -Wint-conversion should be an error, not a pedwarn Date: Sun, 31 Jul 2022 08:44:45 +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.0 X-Bugzilla-Keywords: accepts-invalid, diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com 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: cc 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 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, 31 Jul 2022 08:44:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106416 David Binderman changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcb314 at hotmail dot com --- Comment #3 from David Binderman --- Interestingly, for this C code: extern void g( int); void f( int *p) { int a =3D p; int b =3D (int *) p; g( a); g( b); } gcc does this: $ /home/dcb/gcc/results/bin/gcc -c -std=3Dc2x jul31a.c jul31a.c: In function =E2=80=98f=E2=80=99: jul31a.c:6:17: warning: initialization of =E2=80=98int=E2=80=99 from =E2=80= =98int *=E2=80=99 makes integer from pointer without a cast [-Wint-conversion] 6 | int a =3D p; | ^ jul31a.c:7:17: warning: initialization of =E2=80=98int=E2=80=99 from =E2=80= =98int *=E2=80=99 makes integer from pointer without a cast [-Wint-conversion] 7 | int b =3D (int *) p; | ^ $ The second warning looks wrong to me.=