Re: //Comments
Re: //Comments
- Subject: Re: //Comments
- From: Jean-Daniel Dupas <email@hidden>
- Date: Tue, 13 Jan 2009 23:26:54 +0100
Le 13 janv. 09 à 22:59, Steve Checkoway a écrit :
On Tue, Jan 13, 2009 at 02:46:17PM -0700, Jeff Laing wrote:
#define MACRO(a,b) something(a,b)
MACRO(
firstarg, // watch the pre-processor go thud
secondarg ) // because of the above comment
The problem being that the // was not being recognised by the
PREPROCESSOR as a comment, instead leaving it to the COMPILER to
ignore them, but by the time the compiler saw the line, it looked
like this for some reason:
something(firstarg //watch the pre-processor go thud, secondarg)
Not that standards seem to apply to VS much, but 6.10.3.10 of the
standard (or at least the working draft linked in the previous email
says, "Within the sequence of preprocessing tokens making up an
invocation of a function-like macro, new-line is considered a normal
white-space character."
Presumably, after expansion, it became:
something(firstarg, // watch the pre-processor go thud secondarg)
Does it said if it should strip the comments before or after macro
expansion ?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden