Re:A bug story: data alignment in C on x86 (2016)
by saagarjha on Tuesday September 04, 2018 @08:37PM
(#17914146)
> it is the only correct way to access floating-point as int
Well, other than memcpy. And it's kinda sketchy in the way that they did it: it was a tacked-on footnote in the C99 standard retained through to C11.
> create an array of function pointers of different types
Well, void * * or char * * (spaces so Hacker News doesn’t eat it) would do just as well…
Re:A bug story: data alignment in C on x86 (2016)
by caf on Tuesday September 04, 2018 @09:53PM
(#17914522)
Function pointers aren't guaranteed to convert to and from object pointers.
(The latter is not something I've seen any compiler ever exploit though)