This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: sizeof(bool)
- From: Falk Hueffner <hueffner at informatik dot uni-tuebingen dot de>
- To: "Betu, Satyanarayana" <betus at visa dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 23 Aug 2004 15:43:13 +0200
- Subject: Re: sizeof(bool)
- References: <F3654B8304285F428F52BCD8E555E2B1036A95B8@sw610ex025>
"Betu, Satyanarayana" <betus@visa.com> writes:
> we are using g++ 2.95.3 .Currently we are facing problems with data
> type bool.Programs compiling with this compiler are taking bool size
> as 4 because of which we are not able to prote this application to
> another machines.Do u have any patch for this problem?
The C++ standard allows bool to have size 4, so there is no problem in
g++; the problem is in your application.
However, you might consider upgrading to a current version of g++,
where the size of bool is 1 consistently over all architectures.
--
Falk