• 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: Loco Cocoa Compiler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loco Cocoa Compiler


  • Subject: Re: Loco Cocoa Compiler
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 2 May 2004 21:00:12 +0200

Adam,

On 2.5.2004, at 20:40, Adam wrote:

> case NSStreamEventHasBytesAvailable:
> NSLog(@"NSStreamEventHasBytesAvailable"); //Line 1
> NSString *newLineChar = @"\n"; //Line 2
> NSString *carriageReturnChar = @"\r"; //Line 3
>
> If I run this code it works fine. If I remove line 1 (which was only
> being used for debugging purposes) I get an error
> "parse error before '*' token - on line 2
> This makes no sense to me. These tow lines should not be effecting
> each other.

That's a pretty old and well-known hiccup of the GCC compiler:
immediately after a case label, you are not allowed to declare
variables.

The old workaround is to add a semicolon:

...
case Whatever:; // look here!
int q; // or any other declaration...
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Loco Cocoa Compiler (From: Adam <email@hidden>)

  • Prev by Date: Loco Cocoa Compiler
  • Next by Date: Class generator script
  • Previous by thread: Loco Cocoa Compiler
  • Next by thread: Re: Loco Cocoa Compiler
  • Index(es):
    • Date
    • Thread