ijtrotts@localhost:/tmp$ gcc objc_float_bug.m -lobjc ijtrotts@localhost:/tmp$ ./a.out objc_write_type: cannot parse typespec: f Aborted ijtrotts@localhost:/tmp$ cat objc_float_bug.m #include <objc/Object.h> int main() { float x=1.25; TypedStream* stream = objc_open_typed_stream_for_file("foo",OBJC_WRITEONLY); objc_write_type(stream, @encode(float), &x); objc_close_typed_stream(stream); return 0; } ijtrotts@localhost:/tmp$ gcc -v Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/specs Configured with: ../gcc-3.3.5/configure --enable-languages=c,c++,f77,objc --enable-objc-gc Thread model: posix gcc version 3.3.5
Right, it was never did.
objc/typedstream.h has been deprecated in 4.6.0 and will be removed in the next GCC release. There is no point in trying to fix a bug in it. Please use gnustep-base or some other Foundation-type library if you need serialization/deserialization of objects! gnustep-base has wonderful support for that, in many different shapes and forms! :-) Thanks