MESSAGE
DATE | 2011-06-11 |
FROM | Ruben Safir
|
SUBJECT | Subject: [NYLXS - HANGOUT] (fwd) Re: Using sizeof in the preprocessor
|
From owner-hangout-outgoing-at-mrbrklyn.com Sat Jun 11 01:04:48 2011 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix) id 2EE85100B4B; Sat, 11 Jun 2011 01:04:47 -0400 (EDT) Delivered-To: hangout-outgoing-at-www2.mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix, from userid 28) id F0315100B7B; Sat, 11 Jun 2011 01:04:45 -0400 (EDT) Delivered-To: hangout-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by www2.mrbrklyn.com (Postfix) with ESMTP id 529BB100B0B for ; Sat, 11 Jun 2011 01:04:44 -0400 (EDT) Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id A0990320E0 for ; Sat, 11 Jun 2011 01:04:42 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 20529) id 8970933C43; Sat, 11 Jun 2011 01:04:42 -0400 (EDT) From: Ruben Safir To: hangout-at-nylxs.com Subject: [NYLXS - HANGOUT] (fwd) Re: Using sizeof in the preprocessor User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (NetBSD/5.1 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-Id: <20110611050442.8970933C43-at-panix2.panix.com> Date: Sat, 11 Jun 2011 01:04:42 -0400 (EDT) Sender: owner-hangout-at-mrbrklyn.com Precedence: bulk Reply-To: hangout-at-mrbrklyn.com
-- forwarded message -- Path: reader1.panix.com!panix!bloom-beacon.mit.edu!micro-heart-of-gold.mit.edu!nntp.club.cc.cmu.edu!feeder.erje.net!feeder.news-service.com!2a02:590:1:1::196.MISMATCH!news.teledata-fn.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" From: Johannes Schaub Reply-To: schaub.johannes-at-googlemail.com Date: Sat, 21 May 2011 21:54:20 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: Using sizeof in the preprocessor Newsgroups: comp.lang.c++ References: <4dd7bfa5$0$7624$9b4e6d93-at-newsspool1.arcor-online.net> <4dd809a7$0$2844$7b1e8fa0-at-news.nbl.fi> Followup-To: comp.lang.c++ MIME-Version: 1.0 Lines: 17 Message-ID: <4dd81857$0$6541$9b4e6d93-at-newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 21 May 2011 21:53:59 CEST NNTP-Posting-Host: 2f91366a.newsspool4.arcor-online.net X-Trace: DXC=BYHb>TS2ZFeEB;5>eE0T7m4IUKRM4XCem1:ZIQbMX-Complaints-To: usenet-abuse-at-arcor.de Xref: panix comp.lang.c++:1085128
Juha Nieminen wrote:
> Huibert Bol wrote: >> Identifiers in #if expressions are evaluated as zero > > It seems that at least with gcc "#if true" and "#if false" work as one > would expect. Is this standard?
There are explicit exceptions for true and false. The spec says
After all replacements due to macro expansion and the defined unary operator have been performed, all remaining identiï¬ers and keywords, except for true and false, are replaced with the pp-number 0, and then each preprocessing token is converted into a token. The resulting tokens comprise the controlling constant expression which is evaluated according to the rules of 5.19 ...
-- end of forwarded message --
|
|