This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Definition of 'bool'





We recently added some C++ code and encountered a problem with the definition of 'bool'.  In
infra/include/cyg_type.h, bool is typedef'd as an int, while in C++ a bool is an 8-bit value.  This
difference causes us problems as when sharing a boolean between C and C++ code because the variable
is accessed differently.

I'm wondering if anyone else has seen this problem and how they got around it.  Also, does it make
sense to change the definition of bool in cyg_type.h to be an 8-bit value?

Thanks,
-- Matt


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]