News for hackers. Stuff that matters.
Re:The Lost Art of C Structure Packing (2014) by blaisio on Friday August 05, 2016 @02:32PM (#12234749)
Can you give an example of a compiler and platform where this isn't true? I thought it was part of the standard, and I've never seen C code that didn't make the assumption that this is true.
Re:The Lost Art of C Structure Packing (2014) by vonmoltke on Friday August 05, 2016 @03:01PM (#12234950)
IIRC, icc does not normally pad structures, since x86-64 supports unaligned loads fairly well. xlc on POWER generally tries to do what kazinator stated above because unaligned loads are expensive, if even possible, on those platforms.