• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: //Comments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: //Comments


  • Subject: Re: //Comments
  • From: Steve Checkoway <email@hidden>
  • Date: Tue, 13 Jan 2009 13:59:50 -0800

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)

--
Steve Checkoway


 _______________________________________________
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

  • Follow-Ups:
    • Re: //Comments
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Re: //Comments (From: Fritz Anderson <email@hidden>)
 >RE: //Comments (From: "Jeff Laing" <email@hidden>)

  • Prev by Date: Re: Xcode Debugger: Cannot Step Into a Method in a x86_64 architecture build
  • Next by Date: Re: //Comments
  • Previous by thread: RE: //Comments
  • Next by thread: Re: //Comments
  • Index(es):
    • Date
    • Thread