#pragma pack problem

Radhika S rad@miel.mot.com
Mon May 8 05:23:00 GMT 2000


hi

in the attached program i use #pragma pack(1) . I compile the program
with gcc version 2.95.2
and linked using gnu linker 2.9.1 and ran it gives the Bus Error (core
dumped) as it was trying to access the integer variable with
odd_address.
whereas if i compile the same program with
cc: Workshop Compilers 4.2  with -misalign option  (cc -misalign stru.c
) with solaris linker it doesn;t dump core

Is there any option like -misalign for the gnu linker to make the linker
accept the odd address
access.



More information about the Gcc-bugs mailing list