C++: Is bool a 1-bit variable?

Viewed 7853

I was wondering if bools in C++ are actually 1-bit variables. I am working on a PMM for my kernel and using (maybe multidimensional) bool-arrays would be quiet nice. But i don't want to waste space if a bool in C++ is 8 bit long...

EDIT: Is a bool[8] then 1 Byte long? Or 8 Bytes? Could i maybe declare something like bool bByte[8] __attribute__((packed)); when using gcc? And as i said: I am coding a kernel. So i can't include the standard librarys.

3 Answers
Related