• 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: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future


  • Subject: Re: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future
  • From: Wade Tregaskis <email@hidden>
  • Date: Mon, 14 Jul 2008 20:23:07 -0700

Does anyone know how to turn off this error in XCode 2.5 or fix the code so that it doesn't occur?

It typically occurs when you have something like a conditional on the left side of your statement, e.g.:


(someBoolean ? thisPtr : thatPtr) = NULL;

The warning is trying to say that some time in the future the gcc guys would like to make the result of conditionals constant, effectively, so the above won't be valid. The solution is to rewrite your code to not have this pattern, so something like:

if (someBoolean) {
	thisPtr = NULL;
} else {
	thatPtr = NULL;
}

Wade
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future (From: Mike <email@hidden>)

  • Prev by Date: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future
  • Next by Date: RE: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future
  • Previous by thread: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future
  • Next by thread: RE: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future
  • Index(es):
    • Date
    • Thread