Re: structure size and structure element offset calculation issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux