News for hackers. Stuff that matters.
Re:Every day I learn something new... and stupid. by wnoise on Friday October 15, 2010 @10:21PM (#1797143)
That's 10 bytes. Is it padded to 16 for alignment?
Re:Every day I learn something new... and stupid. by haberman on Friday October 15, 2010 @10:34PM (#1797168)
Yep. sizeof(long double) == 16, at least for me on gcc and Linux. Keep in mind that different compilers implement "long double" differently. According to Wikipedia, MSVC++ just makes it a synonym for "double," but most other compilers on x86 make it this 80-bit "extended precision" floating point.
Re:Every day I learn something new... and stupid. by SAHChandler on Saturday October 16, 2010 @04:29AM (#1797607)
With MSVC on x86, you can pass /Qlong-double to the compiler for it to "properly size" the long double type :)