• 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
GCC 4.0 "C" question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC 4.0 "C" question


  • Subject: GCC 4.0 "C" question
  • From: Mark Dawson <email@hidden>
  • Date: Mon, 31 Oct 2005 11:43:20 -0800

I'm taking on some older code, and I'm getting this warning: "warning: target of assignment not really an lvalue; this will be a hard error in the future"

for the following line:

*((uint32_t*)dst)++ = *((uint32_t*)src)++;

Why is this code going to be an error in the future?

For now, I just replaced it with:
	uint32_t *aligned32Src, *aligned32Dst;
	aligned32Src            = (uint32_t *)src;
	aligned32Dst            = (uint32_t *)dst;
	 *aligned32Dst++	= *aligned32Src++;

It seems a lot more work, but I'm not sure why it's "better"?

Thanks for any updated "C" info!

Mark




 _______________________________________________
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: GCC 4.0 "C" question
      • From: Steve Checkoway <email@hidden>
    • Re: GCC 4.0 "C" question
      • From: David Fang <email@hidden>
  • Prev by Date: Re: cross-project references
  • Next by Date: Re: cross-project references
  • Previous by thread: Re: xCode not finding header files of included frameworks
  • Next by thread: Re: GCC 4.0 "C" question
  • Index(es):
    • Date
    • Thread