[ECOS] Definition of 'bool'

Gary Thomas gary@mlbassoc.com
Thu Sep 16 23:28:00 GMT 2004


On Thu, 2004-09-16 at 17:07, Matt Jerdonek wrote:
> 
> 
> 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?

We've been around this bush before, but I don't recall the details.
Have you searched the archives to see if there are any relevant posts?

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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



More information about the Ecos-discuss mailing list