Hacker News new | past | comments | ask | show | jobs | submit login

What's missing is that it also affects linking, and results in this strange action-at-a-distance. Maybe disabling the linker part with -shared would be a reasonable compromise.



You're wrong, both the doc entry for -Ofast and the one for -ffast-math say that they can result in incorrect programs. Programs are produced by linking, so I don't see what other way to interpret this is possible.


Why not simply replace all FP math with a constant zero? That’d be really fast and an equally valid strict interpretation of “can result in incorrect programs.”


See https://news.ycombinator.com/newsguidelines.html, e.g.:

> Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something.


Just because you’re shallowly dismissing my comment doesn’t make it wrong.

Linking in code with undefined (in this case, redefined) behavior doesn’t automatically invalidate the entire program. But thats the language used because once the undefined behavior is hit at runtime, the spec no longer defines what the behavior is and what the program will do afterwards.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: