Article: AMD's Mobile Strategy
By: Exophase (exophase.delete@this.gmail.com), December 22, 2011 8:32 am
Room: Moderated Discussions
Brett (ggtgp@yahoo.com) on 12/22/11 wrote:
---------------------------
>Wilco (Wilco.Dijkstra@ntlworld.com) on 12/21/11 wrote:
>---------------------------
>>Compilers cannot sort fields in structures
>
>Depends on the compiler and compiler options.
>You can even force a long onto an odd address if you want.
>(Not a good idea in general, one Intel created video format did this for the header
>block to cause grief for RISC chips that would mmap the video file for speed.)
>
The C and C++ standards do actually make guarantees about the ordering. Any halfway sane compiler would never change it by default, but it'd be weird to even have an option for it because then you get into situations where other modules have no idea what the ordering is.
---------------------------
>Wilco (Wilco.Dijkstra@ntlworld.com) on 12/21/11 wrote:
>---------------------------
>>Compilers cannot sort fields in structures
>
>Depends on the compiler and compiler options.
>You can even force a long onto an odd address if you want.
>(Not a good idea in general, one Intel created video format did this for the header
>block to cause grief for RISC chips that would mmap the video file for speed.)
>
The C and C++ standards do actually make guarantees about the ordering. Any halfway sane compiler would never change it by default, but it'd be weird to even have an option for it because then you get into situations where other modules have no idea what the ordering is.