Message164821
> I don't see what the undefined behavior. Can you specify exactly the
> item of the Standard, in which it is mentioned?
It's C99 section 6.5, paragraph 7: "An object shall have its stored value accessed only by an lvalue expression that has one of the following types ...". It's the dereferencing of the pointer that's the problem: that's accessing a stored value of type 'char' by an lvalue expression that has type 'unsigned long'.
> In any case, I don't think that the original patch introduces some new
> undefined behavior.
Ah; were the strict aliasing problems already there before the patch? I didn't check. |
|
Date |
User |
Action |
Args |
2012-07-07 11:09:28 | mark.dickinson | set | recipients:
+ mark.dickinson, pitrou, serhiy.storchaka |
2012-07-07 11:09:28 | mark.dickinson | set | messageid: <1341659368.69.0.0240785441123.issue15144@psf.upfronthosting.co.za> |
2012-07-07 11:09:28 | mark.dickinson | link | issue15144 messages |
2012-07-07 11:09:27 | mark.dickinson | create | |
|