• 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: Possible C++ optimizer problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible C++ optimizer problem


  • Subject: Re: Possible C++ optimizer problem
  • From: David Dunham <email@hidden>
  • Date: Wed, 19 Jul 2006 16:41:04 -0700


On 19 Jul 2006, at 16:00, Steve Checkoway wrote:

So at the moment, I'm suspecting that there's an optimizer bug in gcc 3.3 PowerPC codegen which may manifest with templated code. Does this sound at all familiar to anyone? If I can track it down at all, is it worth a Radar (since Apple's moved on to 4.0)?

My guess is there's a bug in your code that isn't being exposed unless you're optimizing.

That would normally be my guess. But I changed this line

	return Rack(*this).unload(used);

to this

	string	dummyTiles(m_tiles);
	dummyTiles += "";
	Rack			dummyRack(dummyTiles);
	return dummyRack.unload(used);

in order to delay the crash. So far as I could tell, all of that was necessary -- I needed to use an explicit constructor rather than the compiler-written copy-constructor, and I need to make sure that the constructor's string arg wasn't the same. Otherwise, the instance variable m_tiles was getting changed (the unload method does alter m_tiles, though it doesn't trash it the way I was seeing).

I don't believe this is buggy code. Of course, even this might be masking a bug elsewhere.

David Dunham   Macintosh Game Developer   GameHouse Studios
+1 206 926 5722                http://www.gamehouse.com
    "They said it couldn't be done but sometimes it doesn't
     work out that way." -- Casey Stengel


_______________________________________________ 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: Possible C++ optimizer problem
      • From: Steve Checkoway <email@hidden>
References: 
 >Possible C++ optimizer problem (From: David Dunham <email@hidden>)
 >Re: Possible C++ optimizer problem (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Converting CW Projects To XCode
  • Next by Date: Re: How are you viewing these messages?
  • Previous by thread: Re: Possible C++ optimizer problem
  • Next by thread: Re: Possible C++ optimizer problem
  • Index(es):
    • Date
    • Thread