Article View: comp.std.c
Article #4349Re: defined(FOO) in macros
From: John Rickard
Date: Sat, 11 Nov 1995 17:34
Date: Sat, 11 Nov 1995 17:34
13 lines
905 bytes
905 bytes
Colin Plumb (colin@nyx10.cs.du.edu) 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. 6.8.1 (about #if directives) says that macro expansion is done on the expression (except that macro names that are the argument of "defined" are not expanded), and "if the token *defined* is generated as a result of this replacement process [...] the behaviour is undefined". -- John Rickard
Technical Details
Message-ID:
<482ms2$7aq@gatekeeper.atml.co.uk>Path:
arc1-ca.pugleaf.net!news.atml.co.uk!jrrReferences:
<48190c$bak@nyx10.cs.du.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.atml.co.uk!jrr From: jrr@atml.co.uk (John Rickard) Newsgroups: comp.std.c Subject: Re: defined(FOO) in macros Date: 11 Nov 1995 17:34:58 GMT Organization: Advanced Telecommunications Modules Ltd, Cambridge, UK. Message-ID: <482ms2$7aq@gatekeeper.atml.co.uk> References: <48190c$bak@nyx10.cs.du.edu> NNTP-Posting-Host: marlin.atml.co.uk X-Newsreader: TIN [version 1.2 PL2]