tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/x86/x86



On Sun, Jul 08, 2018 at 03:30:36PM +0200, Kamil Rytarowski wrote:
> Misaligned pointer is explicitly documented as undefined behavior in the
> C standard (C11 6.3.2.3 p7). (In C++ it's basically the same.)

Yes, but the standard dos not define what a misaligned pointer is
(or "correctly aligned").

It talks about the prefered alignment that implementations select and
that you can query with _Alignof - but there is no connection of that
value to the section you refer. Some implementations require minimal
alignement like their _Alignof returns, for others "correctly aligned" is
always true.

I might be missing something though.

Martin


Home | Main Index | Thread Index | Old Index