From: Carl Hover Newsgroups: comp.os.msdos.djgpp Subject: enum - Why does true == false? Message-ID: X-Newsreader: Forte Agent 1.6/32.525 X-No-Archive: yes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 22 NNTP-Posting-Date: Thu, 16 Sep 1999 22:49:32 CDT Organization: Giganews.Com - Premium News Outsourcing X-Trace: sv1-2ITIzBF4nJrzAMt5vDtlkz9A31ujuyVI621I1y2r4KgnNx1weca/eIDBAvADBuQMNnsQMVDKemeyL1T!VyOH5A== X-Complaints-To: abuse AT GigaNews DOT Com X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly Date: Thu, 16 Sep 1999 20:49:32 -0700 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Why does this program print "true == false" when compiled with djgpp v2.01, and "true != false" when compiled with Borland C++ 3.1? Are enum constants ill-defined during preprocessing? #include int main(void) { enum {false, true}; #if true == false printf("true == false\n"); #endif #if true != false printf("true != false\n"); #endif return 0; }