Suggestions
RP Lund
ron at rplund.demon.co.uk
Wed Apr 26 22:12:04 BST 2000
In article <200004261901.MAA29169 at purple.trimedia.sv.sc.philips.com>,
Jonathan Coxhead <jonathan at doves.demon.co.uk> wrote:
[Snip]
> Very useful---hard facts! Thank you.
> This is a platform-specific thing, so the answer for Linux doesn't
> tell us much about what we ned to know. If it's true for RISC O S as
> well, for me it carries the implication that no-one uses OSLib with
> C++. But I know they do, so it can't be. (Does that make sense?)
> If RISC O S C++ has |sizeof (bool) == 1|, we are stuck, as Ainsley
> says. But as long as it is 4, no problems, and no change necessary.
#include <stdio.h>
int main(int argc, char **argv)
{
printf("RiscOS G++ size of bool is %d\n", sizeof(bool));
return 0;
}
g++ bool.cc -o bool -liostream
Drlink AOF Linker Version 0.34 01/02/98
bool
RiscOS G++ size of bool is 1
Oh dear! but I haven't had any problems with it yet.
> But we would still be a hostage to fortune: if a new compiler came
> along, with a different definition of |bool|, we'd be stuck. We would
> have to use |osbool, ostrue, osfalse| (and also |osbits, osnone,
> osall|, for consistency) and define |bool| to be |osbool| except in
> C++, where we leave it alone.
> If G++ defines |sizeof (bool) == 4| (under RISC O S), I would
> advocate no change. If it doesn't, we have to do something, and I'm
> terminally confused :-)
PS Please leave the -D__swi alone. I'm used to it now!
Cheers
Ron
--
RP Lund
EMail :<ron at rplund.demon.co.uk>
More information about the oslib-user
mailing list