This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Gcc 2.96 (Nov 24 1999, from CVS) bug
- To: bug-gcc at gnu dot org
- Subject: Gcc 2.96 (Nov 24 1999, from CVS) bug
- From: Duncan Simpson <dps at io dot stargate dot co dot uk>
- Date: Wed, 24 Nov 1999 15:02:52 GMT
System type: i686-unknown-pc-linux-gnu (2.2.5 on a P II)
Verions: 2.96 on Nov 24 1999
Source file: linking.m from as included in the distribution
Bug: segfault
The bug appears to be that split_specs_attrs in c-common.c fails to check for
a == NULL_TREE on line 1091. This occurs when both TREE_VALUE(t) and TREE_PURPOSE(t)
are both NULL_TREE. This may be a bug in the cc1obj.
A minimal patch that avoids the segfault (and instead produces compiler
error messages, which is an improvement IMHO) is
--- gcc/c-common.c.dist Wed Nov 24 14:33:03 1999
+++ gcc/c-common.c Wed Nov 24 14:34:37 1999
@@ -1088,8 +1088,11 @@
a = TREE_PURPOSE (t);
}
/* More attrs can be linked here, move A to the end. */
- while (TREE_CHAIN (a) != NULL_TREE)
- a = TREE_CHAIN (a);
+ if (a != NULL_TREE)
+ {
+ while (TREE_CHAIN (a) != NULL_TREE)
+ a = TREE_CHAIN (a);
+ }
}
}
The bug is apparently present in most versions of 2.95.x too (at least
the same effect appears on my box. The exact messages are
For reference the preprocessed input is
# 1 "linking.m"
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/Object.h" 1 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/objc.h" 1 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 1 3
# 90 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
typedef int ptrdiff_t;
typedef unsigned int size_t;
typedef long int wchar_t;
typedef unsigned int wint_t;
# 345 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 34 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/objc.h" 2 3
typedef unsigned char BOOL;
typedef const struct objc_selector
{
void *sel_id;
const char *sel_types;
} *SEL;
inline static BOOL
sel_eq (SEL s1, SEL s2)
{
if (s1 == 0 || s2 == 0)
return s1 == s2;
else
return s1->sel_id == s2->sel_id;
}
typedef struct objc_object {
struct objc_class* class_pointer;
} *id;
typedef id (*IMP)(id, SEL, ...);
typedef char *STR;
typedef struct objc_class *MetaClass;
typedef struct objc_class *Class;
struct objc_class {
MetaClass class_pointer;
struct objc_class* super_class;
const char* name;
long version;
unsigned long info;
long instance_size;
struct objc_ivar_list* ivars;
struct objc_method_list* methods;
struct sarray * dtable;
struct objc_class* subclass_list;
struct objc_class* sibling_class;
struct objc_protocol_list *protocols;
void* gc_object_type;
};
# 140 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/objc.h" 3
@class Protocol;
typedef void* retval_t;
typedef void(*apply_t)(void);
typedef union {
char *arg_ptr;
char arg_regs[sizeof (char*)];
} *arglist_t;
IMP objc_msg_lookup(id receiver, SEL op);
# 30 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/Object.h" 2 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/typedstream.h" 1 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/hash.h" 1 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 1 3
# 370 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 31 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/hash.h" 2 3
typedef struct cache_node
{
struct cache_node *next;
const void *key;
void *value;
} *node_ptr;
typedef unsigned int (*hash_func_type)(void *, const void *);
typedef int (*compare_func_type)(const void *, const void *);
typedef struct cache
{
node_ptr *node_table;
unsigned int size;
unsigned int used;
unsigned int mask;
unsigned int last_bucket;
hash_func_type hash_func;
compare_func_type compare_func;
} *cache_ptr;
extern cache_ptr module_hash_table, class_hash_table;
cache_ptr hash_new (unsigned int size,
hash_func_type hash_func,
compare_func_type compare_func);
void hash_delete (cache_ptr cache);
void hash_add (cache_ptr *cachep, const void *key, void *value);
void hash_remove (cache_ptr cache, const void *key);
node_ptr hash_next (cache_ptr cache, node_ptr node);
void *hash_value_for_key (cache_ptr cache, const void *key);
BOOL hash_is_key_in_hash (cache_ptr cache, const void *key);
static inline unsigned int
hash_ptr (cache_ptr cache, const void *key)
{
return ((size_t)key / sizeof (void *)) & cache->mask;
}
static inline unsigned int
hash_string (cache_ptr cache, const void *key)
{
unsigned int ret = 0;
unsigned int ctr = 0;
while (*(char*)key) {
ret ^= *(char*)key++ << ctr;
ctr = (ctr + 1) % sizeof (void *);
}
return ret & cache->mask;
}
static inline int
compare_ptrs (const void *k1, const void *k2)
{
return !(k1 - k2);
}
static inline int
compare_strings (const void *k1, const void *k2)
{
if (k1 == k2)
return 1;
else if (k1 == 0 || k2 == 0)
return 0;
else
return !strcmp (k1, k2);
}
# 31 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/typedstream.h" 2 3
# 1 "/usr/include/stdio.h" 1 3
# 1 "/usr/local/include/features.h" 1 3
# 137 "/usr/local/include/features.h" 3
# 195 "/usr/local/include/features.h" 3
# 1 "/usr/include/sys/cdefs.h" 1 3
# 71 "/usr/include/sys/cdefs.h" 3
# 103 "/usr/include/sys/cdefs.h" 3
# 249 "/usr/local/include/features.h" 2 3
# 1 "/usr/include/gnu/stubs.h" 1 3
# 277 "/usr/local/include/features.h" 2 3
# 27 "/usr/include/stdio.h" 2 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 1 3
# 48 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 90 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 155 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 217 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 298 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 345 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 33 "/usr/include/stdio.h" 2 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stdarg.h" 1 3
typedef __builtin_va_list __gnuc_va_list;
# 126 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stdarg.h" 3
# 38 "/usr/include/stdio.h" 2 3
# 1 "/usr/include/bits/types.h" 1 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 1 3
# 48 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 90 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 155 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 217 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 298 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 345 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 29 "/usr/include/bits/types.h" 2 3
typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
# 48 "/usr/include/bits/types.h" 3
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
typedef __quad_t *__qaddr_t;
typedef __u_quad_t __dev_t;
typedef __u_int __uid_t;
typedef __u_int __gid_t;
typedef __u_long __ino_t;
typedef __u_int __mode_t;
typedef __u_int __nlink_t;
typedef long int __off_t;
typedef __quad_t __loff_t;
typedef int __pid_t;
typedef int __ssize_t;
typedef long int __rlim_t;
typedef __quad_t __rlim64_t;
typedef __u_int __id_t;
typedef struct
{
int __val[2];
} __fsid_t;
typedef int __daddr_t;
typedef char *__caddr_t;
typedef long int __time_t;
typedef long int __swblk_t;
typedef long int __clock_t;
typedef unsigned long int __fd_mask;
typedef struct
{
__fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask)) ];
} __fd_set;
typedef int __key_t;
typedef unsigned short int __ipc_pid_t;
typedef long int __blkcnt_t;
typedef __quad_t __blkcnt64_t;
typedef __u_long __fsblkcnt_t;
typedef __u_quad_t __fsblkcnt64_t;
typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;
typedef __u_long __ino64_t;
typedef __loff_t __off64_t;
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;
typedef int __intptr_t;
# 40 "/usr/include/stdio.h" 2 3
typedef struct _IO_FILE FILE;
# 1 "/usr/include/libio.h" 1 3
# 1 "/usr/include/_G_config.h" 1 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 1 3
# 48 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 90 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 155 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 217 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 298 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 345 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stddef.h" 3
# 14 "/usr/include/_G_config.h" 2 3
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 30 "/usr/include/libio.h" 2 3
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stdarg.h" 1 3
# 126 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/stdarg.h" 3
# 48 "/usr/include/libio.h" 2 3
# 67 "/usr/include/libio.h" 3
# 98 "/usr/include/libio.h" 3
struct _IO_jump_t; struct _IO_FILE;
typedef void _IO_lock_t;
struct _IO_marker {
struct _IO_marker *_next;
struct _IO_FILE *_sbuf;
int _pos;
# 186 "/usr/include/libio.h" 3
};
struct _IO_FILE {
int _flags;
char* _IO_read_ptr;
char* _IO_read_end;
char* _IO_read_base;
char* _IO_write_base;
char* _IO_write_ptr;
char* _IO_write_end;
char* _IO_buf_base;
char* _IO_buf_end;
char *_IO_save_base;
char *_IO_backup_base;
char *_IO_save_end;
struct _IO_marker *_markers;
struct _IO_FILE *_chain;
int _fileno;
int _blksize;
__off_t _old_offset;
unsigned short _cur_column;
signed char _vtable_offset;
char _shortbuf[1];
_IO_lock_t *_lock;
__off64_t _offset;
int _unused2[16];
};
typedef struct _IO_FILE _IO_FILE;
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
typedef __ssize_t __io_read_fn (void * __cookie, char *__buf,
size_t __nbytes) ;
typedef __ssize_t __io_write_fn (void * __cookie, __const char *__buf,
size_t __n) ;
typedef int __io_seek_fn (void * __cookie, __off_t __pos, int __w) ;
typedef int __io_close_fn (void * __cookie) ;
# 311 "/usr/include/libio.h" 3
extern int __underflow (_IO_FILE *) ;
extern int __uflow (_IO_FILE *) ;
extern int __overflow (_IO_FILE *, int) ;
extern int _IO_getc (_IO_FILE *__fp) ;
extern int _IO_putc (int __c, _IO_FILE *__fp) ;
extern int _IO_feof (_IO_FILE *__fp) ;
extern int _IO_ferror (_IO_FILE *__fp) ;
extern int _IO_peekc_locked (_IO_FILE *__fp) ;
extern void _IO_flockfile (_IO_FILE *) ;
extern void _IO_funlockfile (_IO_FILE *) ;
extern int _IO_ftrylockfile (_IO_FILE *) ;
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
__gnuc_va_list , int *__restrict) ;
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
__gnuc_va_list ) ;
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t ) ;
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t ) ;
extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t , int, int) ;
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t , int) ;
extern void _IO_free_backup_area (_IO_FILE *) ;
# 57 "/usr/include/stdio.h" 2 3
typedef __off_t fpos_t;
# 1 "/usr/include/bits/stdio_lim.h" 1 3
# 110 "/usr/include/stdio.h" 2 3
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
extern int remove (__const char *__filename) ;
extern int rename (__const char *__old, __const char *__new) ;
extern FILE *tmpfile (void) ;
extern char *tmpnam (char *__s) ;
extern char *tmpnam_r (char *__s) ;
extern char *tempnam (__const char *__dir, __const char *__pfx) ;
extern int fclose (FILE *__stream) ;
extern int fflush (FILE *__stream) ;
extern int fflush_unlocked (FILE *__stream) ;
extern FILE *fopen (__const char *__restrict __filename,
__const char *__restrict __modes) ;
extern FILE *freopen (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) ;
# 197 "/usr/include/stdio.h" 3
extern FILE *fdopen (int __fd, __const char *__modes) ;
# 223 "/usr/include/stdio.h" 3
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) ;
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
int __modes, size_t __n) ;
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
size_t __size) ;
extern void setlinebuf (FILE *__stream) ;
extern int fprintf (FILE *__restrict __stream,
__const char *__restrict __format, ...) ;
extern int printf (__const char *__restrict __format, ...) ;
extern int sprintf (char *__restrict __s,
__const char *__restrict __format, ...) ;
extern int vfprintf (FILE *__restrict __s,
__const char *__restrict __format,
__gnuc_va_list __arg) ;
extern int vprintf (__const char *__restrict __format,
__gnuc_va_list __arg) ;
extern int vsprintf (char *__restrict __s,
__const char *__restrict __format,
__gnuc_va_list __arg) ;
extern int snprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
extern int __vsnprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__printf__, 3, 0)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__printf__, 3, 0)));
# 302 "/usr/include/stdio.h" 3
extern int fscanf (FILE *__restrict __stream,
__const char *__restrict __format, ...) ;
extern int scanf (__const char *__restrict __format, ...) ;
extern int sscanf (__const char *__restrict __s,
__const char *__restrict __format, ...) ;
# 330 "/usr/include/stdio.h" 3
extern int fgetc (FILE *__stream) ;
extern int getc (FILE *__stream) ;
extern int getchar (void) ;
extern int getc_unlocked (FILE *__stream) ;
extern int getchar_unlocked (void) ;
extern int fgetc_unlocked (FILE *__stream) ;
extern int fputc (int __c, FILE *__stream) ;
extern int putc (int __c, FILE *__stream) ;
extern int putchar (int __c) ;
extern int fputc_unlocked (int __c, FILE *__stream) ;
extern int putc_unlocked (int __c, FILE *__stream) ;
extern int putchar_unlocked (int __c) ;
extern int getw (FILE *__stream) ;
extern int putw (int __w, FILE *__stream) ;
extern char *fgets (char *__restrict __s, int __n,
FILE *__restrict __stream) ;
extern char *gets (char *__s) ;
# 420 "/usr/include/stdio.h" 3
extern int fputs (__const char *__restrict __s,
FILE *__restrict __stream) ;
extern int puts (__const char *__s) ;
extern int ungetc (int __c, FILE *__stream) ;
extern size_t fread (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __s) ;
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (__const void *__restrict __ptr,
size_t __size, size_t __n,
FILE *__restrict __stream) ;
extern int fseek (FILE *__stream, long int __off, int __whence) ;
extern long int ftell (FILE *__stream) ;
extern void rewind (FILE *__stream) ;
typedef __off_t off_t;
extern int fgetpos (FILE *__restrict __stream,
fpos_t *__restrict __pos) ;
extern int fsetpos (FILE *__stream, __const fpos_t *__pos) ;
# 519 "/usr/include/stdio.h" 3
# 529 "/usr/include/stdio.h" 3
extern void clearerr (FILE *__stream) ;
extern int feof (FILE *__stream) ;
extern int ferror (FILE *__stream) ;
extern void clearerr_unlocked (FILE *__stream) ;
extern int feof_unlocked (FILE *__stream) ;
extern int ferror_unlocked (FILE *__stream) ;
extern void perror (__const char *__s) ;
extern int sys_nerr;
extern __const char *__const sys_errlist[];
extern int fileno (FILE *__stream) ;
extern int fileno_unlocked (FILE *__stream) ;
extern FILE *popen (__const char *__command, __const char *__modes) ;
extern int pclose (FILE *__stream) ;
extern char *ctermid (char *__s) ;
# 603 "/usr/include/stdio.h" 3
extern void flockfile (FILE *__stream) ;
extern int ftrylockfile (FILE *__stream) ;
extern void funlockfile (FILE *__stream) ;
# 1 "/usr/include/bits/stdio.h" 1 3
extern __inline int
vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
{
return vfprintf (stdout, __fmt, __arg);
}
extern __inline int
getchar (void)
{
return _IO_getc (stdin);
}
extern __inline int
getc_unlocked (FILE *__fp)
{
return (( __fp )->_IO_read_ptr >= ( __fp )->_IO_read_end ? __uflow ( __fp ) : *(unsigned char *) ( __fp )->_IO_read_ptr++) ;
}
extern __inline int
getchar_unlocked (void)
{
return (( stdin )->_IO_read_ptr >= ( stdin )->_IO_read_end ? __uflow ( stdin ) : *(unsigned char *) ( stdin )->_IO_read_ptr++) ;
}
extern __inline int
putchar (int __c)
{
return _IO_putc (__c, stdout);
}
extern __inline int
fputc_unlocked (int __c, FILE *__stream)
{
return ((( __stream )->_IO_write_ptr >= ( __stream )->_IO_write_end) ? __overflow ( __stream , (unsigned char) ( __c )) : (unsigned char) (*( __stream )->_IO_write_ptr++ = ( __c ))) ;
}
extern __inline int
putc_unlocked (int __c, FILE *__stream)
{
return ((( __stream )->_IO_write_ptr >= ( __stream )->_IO_write_end) ? __overflow ( __stream , (unsigned char) ( __c )) : (unsigned char) (*( __stream )->_IO_write_ptr++ = ( __c ))) ;
}
extern __inline int
putchar_unlocked (int __c)
{
return ((( stdout )->_IO_write_ptr >= ( stdout )->_IO_write_end) ? __overflow ( stdout , (unsigned char) ( __c )) : (unsigned char) (*( stdout )->_IO_write_ptr++ = ( __c ))) ;
}
extern __inline int
feof_unlocked (FILE *__stream)
{
return ((( __stream )->_flags & 0x10 ) != 0) ;
}
extern __inline int
ferror_unlocked (FILE *__stream)
{
return ((( __stream )->_flags & 0x20 ) != 0) ;
}
# 149 "/usr/include/bits/stdio.h" 3
# 165 "/usr/include/bits/stdio.h" 3
# 631 "/usr/include/stdio.h" 2 3
# 32 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/typedstream.h" 2 3
typedef int (*objc_typed_read_func)(void*, char*, int);
typedef int (*objc_typed_write_func)(void*, const char*, int);
typedef int (*objc_typed_flush_func)(void*);
typedef int (*objc_typed_eof_func)(void*);
typedef struct objc_typed_stream {
void* physical;
cache_ptr object_table;
cache_ptr stream_table;
cache_ptr class_table;
cache_ptr object_refs;
int mode;
int type;
int version;
int writing_root_p;
objc_typed_read_func read;
objc_typed_write_func write;
objc_typed_eof_func eof;
objc_typed_flush_func flush;
} TypedStream;
int objc_write_type (TypedStream* stream, const char* type, const void* data);
int objc_read_type (TypedStream* stream, const char* type, void* data);
int objc_write_types (TypedStream* stream, const char* type, ...);
int objc_read_types (TypedStream* stream, const char* type, ...);
int objc_write_object_reference (TypedStream* stream, id object);
int objc_write_root_object (TypedStream* stream, id object);
long objc_get_stream_class_version (TypedStream* stream, Class class);
int objc_write_array (TypedStream* stream, const char* type,
int count, const void* data);
int objc_read_array (TypedStream* stream, const char* type,
int count, void* data);
int objc_write_object (TypedStream* stream, id object);
int objc_read_object (TypedStream* stream, id* object);
TypedStream* objc_open_typed_stream (FILE* physical, int mode);
TypedStream* objc_open_typed_stream_for_file (const char* file_name, int mode);
void objc_close_typed_stream (TypedStream* stream);
BOOL objc_end_of_typed_stream (TypedStream* stream);
void objc_flush_typed_stream (TypedStream* stream);
# 31 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/Object.h" 2 3
@interface Object
{
Class isa;
}
+ initialize;
- init;
+ new;
+ alloc;
- free;
- copy;
- shallowCopy;
- deepen;
- deepCopy;
- (Class)class;
- (Class)superClass;
- (MetaClass)metaClass;
- (const char *)name;
- self;
- (unsigned int)hash;
- (BOOL)isEqual:anObject;
- (int)compare:anotherObject;
- (BOOL)isMetaClass;
- (BOOL)isClass;
- (BOOL)isInstance;
- (BOOL)isKindOf:(Class)aClassObject;
- (BOOL)isMemberOf:(Class)aClassObject;
- (BOOL)isKindOfClassNamed:(const char *)aClassName;
- (BOOL)isMemberOfClassNamed:(const char *)aClassName;
+ (BOOL)instancesRespondTo:(SEL)aSel;
- (BOOL)respondsTo:(SEL)aSel;
- (BOOL)conformsTo:(Protocol*)aProtocol;
+ (IMP)instanceMethodFor:(SEL)aSel;
- (IMP)methodFor:(SEL)aSel;
+ (struct objc_method_description *)descriptionForInstanceMethod:(SEL)aSel;
- (struct objc_method_description *)descriptionForMethod:(SEL)aSel;
- perform:(SEL)aSel;
- perform:(SEL)aSel with:anObject;
- perform:(SEL)aSel with:anObject1 with:anObject2;
- (retval_t)forward:(SEL)aSel :(arglist_t)argFrame;
- (retval_t)performv:(SEL)aSel :(arglist_t)argFrame;
+ poseAs:(Class)aClassObject;
- (Class)transmuteClassTo:(Class)aClassObject;
- subclassResponsibility:(SEL)aSel;
- notImplemented:(SEL)aSel;
- shouldNotImplement:(SEL)aSel;
- doesNotRecognize:(SEL)aSel;
- error:(const char *)aString, ...;
+ (int)version;
+ setVersion:(int)aVersion;
+ (int)streamVersion: (TypedStream*)aStream;
- read: (TypedStream*)aStream;
- write: (TypedStream*)aStream;
- awake;
@end
# 28 "linking.m" 2
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include/objc/NXConstStr.h" 1 3
@interface NXConstantString: Object
{
char *c_string;
unsigned int len;
}
-(const char *) cString;
-(unsigned int) length;
@end
# 29 "linking.m" 2
void __objc_linking (void)
{
[Object name];
[NXConstantString name];
}
Surely deferencing NULL is always a bug :-)