Hi Jonathan Wakely,
Thanks for quick reply.
Structure is included from same header file,So there is no difference in
structure.How to get information related to alignments from preprocessor
output.Is there any additional options I need to give apart from "-E".
If there is bug in GCC porting, what defines (in port.h) effects the
structure size & offset calculations.
Thanks,
Siva prasad
On 05/19/2014 04:02 PM, Jonathan Wakely wrote:
On 19 May 2014 11:24, Sivaprasad wrote:
Hi all,
I am using cross compiler ( gcc 4.3.4) ported for custom processor.
I have observed strange issue.
same structure is used in different files and both the files are compiled
with same compilation options. But the structure size and structure element
offset are generated differently (identified while analysing assembly code).
If the structure is packed then code generated to handle that structure is
similar in both the files. But code size was increased (due packed
structure).
What could be the reason for this issue ?
You haven't provided enough information to answer.
It shouldn't happen, so either there's a bug in your port or the
structures aren't really the same.
I would compare the preprocessed output, and compare the size and
alignment requirements of each structure member in both files to see
what is different.