• 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: gcc c++ vs. visual c++ info?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc c++ vs. visual c++ info?


  • Subject: Re: gcc c++ vs. visual c++ info?
  • From: Thomas Dibble <email@hidden>
  • Date: Thu, 13 Jan 2005 09:32:42 -0800


The biggest differences I've seen between the two is that Visual C++ (v6 and .Net 2003 at least) is generally ARM-compliant, and gcc is ANSI-compliant. You'll see the effects of this in variables initialized in for(;;) loops and such


for ( int i=0;5;i++ )
{
	// ...
}

int result = i;


But, usually, these are compile errors, not runtime errors. Perhaps scan through your compiler warnings, if you have any, for clues of non-compliant possibilities (gcc does a good job of identifying Visual C++-isms that aren't standard-compliant).


Other things to look at: any cross-platform libraries you are using might have problems, any bit-shifting you are doing might cause problems, any assumptions about static initializers might cause problems ...

				---- Tom Dibble


On Jan 13, 2005, at 8:17 AM, james tittle wrote:

...I've recently been asked to port some windoze code to osx, and fairly quickly got it to compile, but then realized that all kinds of weird things are going on incorrectly...I've since determined that this must be due to differences between the c++ dialects of gcc and visual c++, and so am trying to work around this: so, I'm wondering if anyone knows of a good site that deals with the possible differences?

...also, can anyone suggest which of the extra c++ flags available in xcode's target inspector would be most fruitful? Or should I just invoke them all?

thanx,
james

_______________________________________________
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

_______________________________________________ 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 c++ vs. visual c++ info?
      • From: Andrew Pinski <email@hidden>
References: 
 >gcc c++ vs. visual c++ info? (From: james tittle <email@hidden>)

  • Prev by Date: Re: gcc c++ vs. visual c++ info?
  • Next by Date: Re: gcc c++ vs. visual c++ info?
  • Previous by thread: Re: gcc c++ vs. visual c++ info?
  • Next by thread: Re: gcc c++ vs. visual c++ info?
  • Index(es):
    • Date
    • Thread