This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR43814] Assume function arguments of pointer type are aligned.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Tom de Vries <vries at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Maxim Kuvyrkov <maxim at codesourcery dot com>
- Date: Sat, 24 Sep 2011 11:40:59 +0200
- Subject: Re: [PATCH, PR43814] Assume function arguments of pointer type are aligned.
- References: <4E787543.1090009@codesourcery.com> <CAFiYyc1-2tmJLz_Z+cWK2sk7Nsvjw7HFvu32BmVtMj0qYv++7Q@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sat, Sep 24, 2011 at 11:31:25AM +0200, Richard Guenther wrote:
> In the end I'd probably say the patch is ok without the option (thus
> turned on by default), but if LC_GLOBAL_LOCALE is part of the
> glibc ABI then we clearly can't do this.
Yes, LC_GLOBAL_LOCALE is part of glibc ABI. I guess we could only assume
the alignment if the pointer is actually dereferenced on the statement
that checks the ABI or in some stmt that dominates the spot where you want
to check the alignment. It is IMHO quite common to pass arbitrary values
in pointer types, then cast them back or just compare.
Jakub