[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rtl] gcc and g++ mbuff confusion. __attribute__((packed))
On Sat, 15 Apr 2000, Tomasz Motylewski wrote:
:
: This is a follow up on a private mail exchange about C++ and C user space
: programs seeing diferent things in the same mbuff shared area.
:
: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRRRGGGGHHHHH !!!!
[...]
Hi.
This all can be simply explained. The type 'bool' exists in c++ internaly
or defined as the 'char' type in some header, but in plain c the
'bool' type is undefined, so you _have_ to typedef it from some type. In
your case 'bool' type was defined from 'int' type, included from some
mbuff header. The simple solution is to use/define your own type like :
typedef unsigned char Bool;
....
:
Rus