Xref: utzoo comp.sys.m68k:1796 comp.lang.c:30884 Path: utzoo!utgpu!watserv1!watmath!att!cbnewsl!rl From: rl@cbnewsl.att.com (roger.h.levy) Newsgroups: comp.sys.m68k,comp.lang.c Subject: cast (char *) to (int *) ? Keywords: 68000 C Message-ID: <1990Aug7.183302.26585@cbnewsl.att.com> Date: 7 Aug 90 18:33:02 GMT Followup-To: comp.sys.m68k Organization: AT&T Bell Laboratories Lines: 13 We have a substantial amount of C code originally targeted to a 68008 system and now being ported to a 68000 system. In the past, we have casted character pointers to integer pointers in some situations and then dereferenced the pointer. Although this works OK with a 68008, it will result in a bus error on our 68000 target if the address of the data is odd. Since we need to correct our code, I was wondering whether a tool exists that can identify instances of such statements. BTW, I checked my K&R and noted the warning about possible addressing errors as a result of this practice. We realize the error of our ways so no further scolding is necessary. Roger Levy ...!rl@groucho.ATT.COM