Path: utzoo!utgpu!water!watmath!orchid!tdwest From: tdwest@orchid.waterloo.edu (Terry D. West) Newsgroups: comp.sys.amiga Subject: BIG BUG in Manx3.6a (+L only) Keywords: OOP ACK (pointer comparisons) Message-ID: <12325@orchid.waterloo.edu> Date: 28 Feb 88 22:12:43 GMT Distribution: comp Organization: U of Waterloo, Ontario Lines: 56 Well, I guess I have the dubious honour of reporting the first major bug in 3.6a 12-18-87 Manx C :-( Jim, are you listening? Good. Beware of pointer comparisons and assignments under the +L option. It seems that the _indirect_ pointer comparison result assigned _indirectly_ really breaks the compiler. It gurus during compilation due to an odd address reference on a move.w instruction. Here's a short file which bares all: --------- cut here, compile, and guru during compilation ----------- /* bomber.c * * This program gurus the MANX 3.6 compiler * when the +L option is used. * * Copyright 1988 Terry D. West & Jeff A. Voskamp :-) * Who'd reserve rights to this? * */ struct STYPE{ struct STYPE *next; long i; } *s1,*s2; main() { long ll; struct STYPE *sp1,*sp2; /* This one gurus */ s1->i = (s1->next != s2->next); /* but none of these do! */ s1->i = ( (long) (s1->next) != (long) (s2->next)); ll = (s1->next != s2->next); sp1 = s1->next; sp2 = s2->next; s1->i = (sp1 != sp2); s1->i = (sp1 != s2->next); s1->i = (s1->next != sp2); } -- Terry D. West watmath!orchid!tdwest tdwest@orchid.waterloo.edu