Skip to content

Comment on The strict aliasing situation is pretty bad (2016)parent

Comments

Can the C compiler really optimize foo to always return 0?

Yes

That seems extremely unintuitive to me.

C compilers are extremely unintuitive. This is a relatively sane case, they do things that are much more surprising than this.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.