🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4359

Re: defined(FOO) in macros

#4359
From: Colin Plumb
Date: Wed, 15 Nov 1995 16:45
15 lines
982 bytes
In article <481adm$q4v@newshost.lanl.gov>,
Tanmoy Bhattacharya <tanmoy@qcd.lanl.gov> wrote:
>|> Now, the second two diagnostics are fine, but is the compiler allowed to
>|> not recognize "defined(FOO)" when it appears as part of a macro expansion?
>
>Yes. see 6.8.1

Yup, there it says it:
"If the token defined is generated as a result of this replacemnt process or
use of the defined unary operator does not match one of the two specified
forms prior to macro replacement, the behaviour is undefined."

Sorry about that.  Good thing I didn't send the bug report!
-- 
	-Colin
Technical Details
Message-ID: <48d5fj$bt@nyx10.cs.du.edu>
Path: arc1-ca.pugleaf.net!nyx10.cs.du.edu!not-for-mail
References: <48190c$bak@nyx10.cs.du.edu> <481adm$q4v@newshost.lanl.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!nyx10.cs.du.edu!not-for-mail
From: colin@nyx10.cs.du.edu (Colin Plumb)
Newsgroups: comp.std.c
Subject: Re: defined(FOO) in macros
Date: 15 Nov 1995 09:45:39 -0700
Organization: University of Denver, Dept. of Math & Comp. Sci.
Message-ID: <48d5fj$bt@nyx10.cs.du.edu>
References: <48190c$bak@nyx10.cs.du.edu> <481adm$q4v@newshost.lanl.gov>
NNTP-Posting-Host: nyx10.cs.du.edu