On Wed, 13 Sep 2017, Bernd Edlinger wrote:
> So you suggest to use min_align_of_type instead of TYPE_ALIGN.
>
> That would also make sense for the traditional -Wcast-align on
> strict-alignment targets, right?
Yes, and yes (though I'm not sure if any strict-alignment targets have
this peculiari
On 09/13/17 22:03, Joseph Myers wrote:
> On Wed, 13 Sep 2017, Bernd Edlinger wrote:
>
>> On 09/13/17 19:06, Joseph Myers wrote:
>>> What does this warning do in cases where a type has different alignments
>>> inside and outside structs? I'm thinking of something like
>>>
>>> struct s { long long
On Wed, 13 Sep 2017, Bernd Edlinger wrote:
> On 09/13/17 19:06, Joseph Myers wrote:
> > What does this warning do in cases where a type has different alignments
> > inside and outside structs? I'm thinking of something like
> >
> > struct s { long long x; } *p;
> > /* ... */
> > (long long *)p
>
On 09/13/17 19:06, Joseph Myers wrote:
> What does this warning do in cases where a type has different alignments
> inside and outside structs? I'm thinking of something like
>
> struct s { long long x; } *p;
> /* ... */
> (long long *)p
>
> on 32-bit x86 - where long long's preferred alignment
What does this warning do in cases where a type has different alignments
inside and outside structs? I'm thinking of something like
struct s { long long x; } *p;
/* ... */
(long long *)p
on 32-bit x86 - where long long's preferred alignment is 8 bytes, but in
structures it's 4 bytes. (Likewis
Ping...
On 09/04/17 10:07, Bernd Edlinger wrote:
> Hi,
>
> as you know we have a -Wcast-align warning which works only for
> STRICT_ALIGNMENT targets. But occasionally it would be nice to be
> able to switch this warning on even for other targets.
>
> Therefore I would like to add a strict ver
Hi,
as you know we have a -Wcast-align warning which works only for
STRICT_ALIGNMENT targets. But occasionally it would be nice to be
able to switch this warning on even for other targets.
Therefore I would like to add a strict version of this option
which can be invoked with -Wcast-align=strict