Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!dptg!att!cbnewsl!dfp From: dfp@cbnewsl.ATT.COM (david.f.prosser) Newsgroups: comp.lang.c Subject: Re: Atomic #defines (was Re: Password checking program) Message-ID: <1706@cbnewsl.ATT.COM> Date: 31 Aug 89 15:18:20 GMT References: <10867@smoke.BRL.MIL> Reply-To: dfp@cbnewsl.ATT.COM (david.f.prosser) Organization: AT&T Bell Laboratories Lines: 15 In article <10867@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >In article <13899@bloom-beacon.MIT.EDU> scs@adam.pika.mit.edu (Steve Summit) writes: >> #if EOF != -2 > >This assumes more than the standard guarantees about EOF. >In particular, EOF might be defined as an enumeration constant. >That's unlikely, but permitted. My reading of the pANS says that EOF must be a macro defined in . However, the integral constant expression that EOF is replaced by may well involve operators or operands that are not valid in #if directives. The pANS has certain macros whose replacement expression are required to be valid #if expression, so this was not an oversight. Dave Prosser ...not an official X3J11 answer...