Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ames!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Is #define THING -10 completely safe? Message-ID: <14999@smoke.brl.mil> Date: 28 Jan 91 05:11:16 GMT References: <33@christmas.UUCP> <1991Jan27.233142.28302@watdragon.waterloo.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 12 In article <1991Jan27.233142.28302@watdragon.waterloo.edu> ccplumb@rose.uwaterloo.ca (Colin Plumb) writes: -As all loyal followers of the Obfuscated C code contest know, -array[i] == *(array+i) == *(i+array) == i[array]. So -#define X1 -10 -#define X2 (-10) -[...] -printf("%d, %d\n", X1[p], X2[p]); -Will print "-35, 15". No, that's a ludicrous misinterpretation of the situation. The compiler does NOT perform a textual "rewrite" of the [] expression then reparse it.