public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/78014] -Wformat -vs- size_t
       [not found] <bug-78014-4@http.gcc.gnu.org/bugzilla/>
@ 2022-10-19  1:49 ` sam at gentoo dot org
  2022-10-19  3:29 ` de34 at live dot cn
  1 sibling, 0 replies; 2+ messages in thread
From: sam at gentoo dot org @ 2022-10-19  1:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78014

--- Comment #8 from Sam James <sam at gentoo dot org> ---
FWIW, the Clang counterpart to this bug is
https://github.com/llvm/llvm-project/issues/41959.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/78014] -Wformat -vs- size_t
       [not found] <bug-78014-4@http.gcc.gnu.org/bugzilla/>
  2022-10-19  1:49 ` [Bug c++/78014] -Wformat -vs- size_t sam at gentoo dot org
@ 2022-10-19  3:29 ` de34 at live dot cn
  1 sibling, 0 replies; 2+ messages in thread
From: de34 at live dot cn @ 2022-10-19  3:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78014

Jiang An <de34 at live dot cn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |de34 at live dot cn

--- Comment #9 from Jiang An <de34 at live dot cn> ---
Additionally, what happens when I write `using my_size_t =
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 sizeof,
alignof, etc..

Perhaps the built-in operator- between pointers also needs to generate such
"strength" for the purpose of ptrdiff_t.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-19  3:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-78014-4@http.gcc.gnu.org/bugzilla/>
2022-10-19  1:49 ` [Bug c++/78014] -Wformat -vs- size_t sam at gentoo dot org
2022-10-19  3:29 ` de34 at live dot cn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).