diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-02-02 19:40:12 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-02-02 19:40:12 -0500 |
commit | 241365d3cca8fbfa14551346155b669450ad70d3 (patch) | |
tree | 8280a6358468e7b4f6f13dcd330037a1e70b0357 /gcc/objc | |
parent | b2948281c3d8e4221b1fab6d11db272bf735276a (diff) | |
download | gcc-241365d3cca8fbfa14551346155b669450ad70d3.zip gcc-241365d3cca8fbfa14551346155b669450ad70d3.tar.gz gcc-241365d3cca8fbfa14551346155b669450ad70d3.tar.bz2 |
(init_check_module_version): Replace call to abort function with call
to objc_error function.
From-SVN: r13588
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/init.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/objc/init.c b/gcc/objc/init.c index 902d224..0518881 100644 --- a/gcc/objc/init.c +++ b/gcc/objc/init.c @@ -1,5 +1,5 @@ /* GNU Objective C Runtime initialization - Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. @@ -314,15 +314,17 @@ static void init_check_module_version(Module_t module) { if ((module->version != OBJC_VERSION) || (module->size != sizeof (Module))) { - fprintf (stderr, "Module %s version %d doesn't match runtime %d\n", - module->name, (int)module->version, OBJC_VERSION); + int code; + if(module->version > OBJC_VERSION) - fprintf (stderr, "Runtime (libobjc.a) is out of date\n"); + code = OBJC_ERR_OBJC_VERSION; else if (module->version < OBJC_VERSION) - fprintf (stderr, "Compiler (gcc) is out of date\n"); + code = OBJC_ERR_GCC_VERSION; else - fprintf (stderr, "Objective C internal error -- bad Module size\n"); - abort (); + code = OBJC_ERR_MODULE_SIZE; + + objc_error(nil, code, "Module %s version %d doesn't match runtime %d\n", + module->name, (int)module->version, OBJC_VERSION); } } @@ -364,11 +366,10 @@ __objc_init_protocols (struct objc_protocol_list* protos) } else if (protos->list[i]->class_pointer != proto_class) { - fprintf (stderr, - "Version %d doesn't match runtime protocol version %d\n", - (int)((char*)protos->list[i]->class_pointer-(char*)0), - PROTOCOL_VERSION); - abort (); + objc_error(nil, OBJC_ERR_PROTOCOL_VERSION, + "Version %d doesn't match runtime protocol version %d\n", + (int)((char*)protos->list[i]->class_pointer-(char*)0), + PROTOCOL_VERSION); } } |