Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!ccnysci!phri!news From: roy@alanine.phri.nyu.edu (Roy Smith) Newsgroups: comp.lang.c Subject: Hard to find errors Message-ID: <1990Jan5.231112.8217@phri.nyu.edu> Date: 5 Jan 90 23:11:12 GMT Sender: news@phri.nyu.edu (News System) Organization: Public Health Research Institute, New York City Lines: 24 Somebody was looking for hard-to-find errors in C programs, to compile a list of them. Here's one I just committed (but fortunately caught as soon as I typed it). I meant to type while (pos < old->next->n) but transposed the second -> and ended up with while (pos < old->next>-n) which appears to be legal. You can parse it as while (pos < (old->next) > -n) which is legal, but certainly not what I meant. I suppose this might draw some warnings about illegally mixing integers and pointers, so it might not be so hard to find. I honestly don't know offhand which way the "<" and ">" group, nor do I really care. -- Roy Smith, Public Health Research Institute 455 First Avenue, New York, NY 10016 roy@alanine.phri.nyu.edu -OR- {att,philabs,cmcl2,rutgers,hombre}!phri!roy "My karma ran over my dogma"