Re: bug in XCode?
Re: bug in XCode?
- Subject: Re: bug in XCode?
- From: Fritz Anderson <email@hidden>
- Date: Thu, 22 Apr 2004 13:14:34 -0500
Lines of the form
lvalue = { rvalue, rvalue };
are in error in C. C99 and gcc do allow compound literals (search the
developer documentation for "gcc compound literal"), but in addition to
the values between the braces, you have to provide a cast-style type
expression.
FieldID = (ControlID) {kLOApplicationSig, 128+i};
would work, other things permitting. Putting a "ControlID" in front of
the line silenced the error by turning the line from an assignment into
an initializer, where a type expression is not necessary.
-- F
On 21 Apr 2004, at 9:14 PM, H. Miersch wrote:
the line
FieldID = {kLOApplicationSig,128+i};
caused the following errors on compilation:
newcust.c:5: error: label `newCustomerEnd' used but not defined
newcust.c:14: error: parse error before '{' token
newcust.c:25: error: parse error before ':' token
in the header file, FieldID is declared as a ControlID. today i changed
the line to the following:
ControlID FieldID = {kLOApplicationSig,128+i};
and now i don't get those errors. this means to me that the declaration
in the header file doesn't work. the question is, why? is this a bug?
--
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/
_______________________________________________
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.