Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-entropy!quick!happym!polari!6sigma From: 6sigma@polari.UUCP (Brian Matthews) Newsgroups: comp.lang.c Subject: Re: This one bit me today Message-ID: <1067@polari.UUCP> Date: 6 Oct 89 21:32:38 GMT References: <2432@hub.UUCP> <832@crdos1.crd.ge.COM> Reply-To: 6sigma@.UUCP (Brian Matthews) Organization: PolarServ, Seattle WA Lines: 16 In article <832@crdos1.crd.ge.COM> davidsen@crdos1.UUCP (bill davidsen) writes: |In article <2432@hub.UUCP>, dougp@voodoo.ucsb.edu writes: || int a=1,b=2,*p=&a,c; || c=b/*p; || First real flaw in the C grammer [sic] I have found. | It pops up in macros from time to time. Consider: | #define xavg(m) (sum+3)/m That's why anyone who knows what they're doing will parenthesize each argument in the expansion of the macro and use liberal whitespace, thusly: #define xavg(m) (sum + 3) / (m) Then things like xavg (*p) and xavg (x + y) work as expected. -- Brian L. Matthews blm@6sigma.UUCP