This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: Mismatch between 'C' and 'C++' structures
- To: Bill Marcotte <bill at pentek dot com>
- Subject: Re: [ECOS] Mismatch between 'C' and 'C++' structures
- From: Jonathan Larmour <jlarmour at redhat dot co dot uk>
- Date: Tue, 20 Jun 2000 22:04:00 +0100
- CC: ecos-discuss at sourceware dot cygnus dot com
- Organization: Red Hat UK Ltd.
- References: <200006202028.NAA03734@cygnus.com>
Bill Marcotte wrote:
>
> I am currently working on an i960 port of ECOS. When I build ECOS with
> Asserts enabled, I get the following message when I run the code:
>
> Size of C struct (cyg_mempool_var) !=
> Size of C++ struct (Cyg_Mempool_Variable)
>
> sizeof(cyg_mempool_var) = 0x30
> sizeof(Cyg_Mempool_Variable) = 0x40
>
> Does anyone know how to resolve this?
Well the obvious question is whether you modified any of the generic kernel
code in this area.
Failing that, it would appear that the i960 g++ must pad C++ classes in
some way different to i960 gcc pads structs. Perhaps there is some compiler
switch that can be used to prevent this.
And just to check, you are compiling the kernel with -fno-rtti aren't you?
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault