[ECOS] Definition of 'bool'

Matt Jerdonek MJerdonek@hypercom.com
Thu Sep 16 23:07:00 GMT 2004





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



More information about the Ecos-discuss mailing list