• 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: Apostrophes in #warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apostrophes in #warning


  • Subject: Re: Apostrophes in #warning
  • From: Paul Lalonde <email@hidden>
  • Date: Tue, 2 Mar 2004 16:02:13 -0500

Le 04-03-02, ` 05:33, Matt Gough a icrit :

I would have thought that the compiler should treat everything after the #warning as plain text, without having to worry about quote matching.

There is no such thing as "plain text" in C/C++ preprocessor statements. Such statements (eg #warning) need to be made up of a sequence of "preprocessing tokens", which are themselves a subset of the valid tokens in a C/C++ source file.


In short, you can't have just a solitary single or double quote -- it would need to be paired. I usually just set up the entire warning message as a single string literal. Eg,

#warning "Here's my message"

--
Paul Lalonde                       paullalonde at mac dot com
"Il n'y a que les banques qui sont libres" -- Jean-Luc Godard
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Apostrophes in #warning (From: Matt Gough <email@hidden>)

  • Prev by Date: Re: Creating gprof .order Files
  • Next by Date: Xcode build failed on new G5
  • Previous by thread: Re: Apostrophes in #warning
  • Next by thread: Re: Creating gprof .order Files
  • Index(es):
    • Date
    • Thread