| Post Reply | RetroFed Forum Forum Index » C Programming Language |
| Author | Message | ||
|---|---|---|---|
|
iliketurtiles
programming.dev
iliketurtiles@programming.dev Joined: 2025-03-07 |
I thought the book I'm reading had typos when I read code that uses this:
However if you take a look at the decompiled version on godbolt: link this correctly takes the value at the address stored in src, and copies it to the address in dest. I'd love some help understanding what going on. The code looks like nonsense to me, "*&" should "cancel out" IMO. ======== Meanwhile here's what I thought the correct code would be:
Doesn't do what's expected, see decompiled: link. What's wrong with this? When the RHS is a constant it works fine, and seems to be a common pattern people use. |
||
| 2 Original | |||
| Post Reply |
Back to top |