Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does it matter unless you're reading a float from varargs? What else can it break?


I don't know exactly what, but I know there is more than just that, because calling printf breaks with a misaligned stack even when you're not passing it any floating-point arguments. And even if it doesn't break anything for you today, you're basically committing UB by violating the compiler's assumptions.


Aren't there GCC command-line flags to specify alignment assumptions?


Yes (see https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.ht...), but this article doesn't use them.


Code that uses vector registers




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

Search: