This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Definition of 'bool'
- From: Matt Jerdonek <MJerdonek at hypercom dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Thu, 16 Sep 2004 16:07:55 -0700
- Subject: [ECOS] 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