From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 433493858C83; Wed, 19 Oct 2022 03:29:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 433493858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666150184; bh=m5q4MKeLTvVb3gKhyq3pSOLCMYfM+/a+4b5+5ABMc28=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nXJukzxN1hB5Cp17OsSSoZ2toFLdRtx40gHbKThSoy2fyZIBRQJz/89D1B7owy1pW LHVEU8qIQqsuy1NjBTaObrRFApj4kR4Q/qK1oQwRAbaWLK/CtQ5pFXX+9kD3DssOtO rtGdN2U1tQQoTwqbzwniMIi+jTyHDhM0SLeVtY8s= From: "de34 at live dot cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/78014] -Wformat -vs- size_t Date: Wed, 19 Oct 2022 03:29:43 +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: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: de34 at live dot cn 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D78014 Jiang An changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |de34 at live dot cn --- Comment #9 from Jiang An --- Additionally, what happens when I write `using my_size_t =3D decltype(sizeof(0));` (C++) or `typedef typeof(sizeof(0)) my_size_t;` (GNU = C or C23)? I think such enhancement of warnings effectively requires size_t to be some kind of "strong typedef", and the "strength" should be generated from sizeo= f, alignof, etc.. Perhaps the built-in operator- between pointers also needs to generate such "strength" for the purpose of ptrdiff_t.=