: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: huaixin@alibaba-inc.com
Target Milestone: ---
Document says that “alignment of any given struct or union type is required by
the ISO C standard to be at least a perfect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94338
--- Comment #1 from huaixin chang ---
I have tested on x86_64 with gcc version 4.8.5 20150623,
and also arm with gcc version 9.2.1 20190812.
They behaves the same.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94338
--- Comment #5 from huaixin chang ---
(In reply to Richard Biener from comment #2)
> I think the testcase is ill-formed and should be diagnosed in some form.
> IIRC there's some documented behavior (that's not implemented) that
> __aligned__
> on
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94338
--- Comment #6 from huaixin chang ---
(In reply to jos...@codesourcery.com from comment #3)
> It's a mistake to be referring to the C standard for the interpretation of
> alignment attributes. The C standard way of specifying alignment is
> _A
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94338
--- Comment #7 from huaixin chang ---
(In reply to Martin Sebor from comment #4)
> Sounds like there's agreement that the code should at least get a warning
> then, so confirmed.
>
> The attribute aligned section of the manual describing the va
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94338
--- Comment #10 from huaixin chang ---
(In reply to Richard Biener from comment #9)
> Btw,
>
> struct X {
> long a __attribute__((__aligned__(128)));
> long b __attribute__((__aligned__(128)));
> };
> struct X A __attribute__((__aligned_
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94338
--- Comment #11 from huaixin chang ---
(In reply to huaixin chang from comment #10)
> (In reply to Richard Biener from comment #9)
> > Btw,
> >
> > struct X {
> > long a __attribute__((__aligned__(128)));
> > long b __attribute__((__alig