On 07.11.2019 11:53, Martin Husemann wrote: > On Thu, Nov 07, 2019 at 11:46:47AM +0100, Kamil Rytarowski wrote: >> Please see my newer mail with rationale and another one with a >> confirmation that this was real UB. > > Confirmation? The dereference in this case happens in memcmp() > only, so what misalignment could there be? > > Martin > It was (as I called it) syntactical dereference A->b, followed by retrieving of its address &(). C does not define this syntax as optimizable (removal of dereference) and there is UB (but not real life). There are different semantics that are defined, such as *&, but &A->b is not one of them (certainly it could - I can write a proposal to the C standard).
Attachment:
signature.asc
Description: OpenPGP digital signature