Re: [somewhat OT] portable C under OjbC
Re: [somewhat OT] portable C under OjbC
- Subject: Re: [somewhat OT] portable C under OjbC
- From: Boz Jennings <email@hidden>
- Date: Thu, 7 Feb 2002 09:52:31 -0800
Thanks for all the replies!
The portability I'm looking for relates to things like the size of
primitives, endian issues and such.
For example, as I write my code happily away on my TiBook all my int
variables have a whopping 32 bits. There could easily be times where I
use large int values that would blow out a 16 bit int machine. If this
problem came up a year after writing the code it'd be a major hassle to
debug. I'd like to have a tool that looks at the code and checks it
against a lowest-common-denominator ANSI C system.
... I don't know enough about endian issues to give an example.
A more general thing to check might be non-portable char assignment.
That is, "char ch = 0x41" could show a warning but "char ch = 'A'" would
not.
Another one could be comparing a char to EOF. This works fine on 16 bit
chars but not on 8 bit chars....
These are all ANSI C compliant things that could cause trouble if code
is ported.
???,
boz
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.