This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH] -Wsizeof-pointer-memaccess warning
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Wed, 15 Aug 2012 16:29:55 +0000
- Subject: Re: [RFC PATCH] -Wsizeof-pointer-memaccess warning
- References: <20120718124014.GH9077@tucnak.redhat.com> <Pine.LNX.4.64.1208151537580.17502@digraph.polyomino.org.uk> <20120815154852.GE1999@tucnak.redhat.com>
On Wed, 15 Aug 2012, Jakub Jelinek wrote:
> I was mainly interested in whether such an approach is acceptable, or
> whether I need to stop evaluating sizeof right away, create SIZEOF_EXPR
> and only fold it during fully_fold*. I've briefly looked at that today,
The approach is fine. Delaying evaluating sizeof is hard simply because
of the expectation that integer constant expressions in general are
evaluated early.
--
Joseph S. Myers
joseph@codesourcery.com