Re: STL behaving improperly
Re: STL behaving improperly
- Subject: Re: STL behaving improperly
- From: Andreas Grosam <email@hidden>
- Date: Fri, 21 Oct 2005 14:07:28 +0200
On 21.10.2005, at 08:19, Cianflone, Chris wrote:
This is a shot in the dark since you didn't give more info about
"failing at runtime", but I found -fshort-enums was the culprit after
much trial and error. This had not been a problem in gcc 3, but
became problematic in gcc 4.
Sidenote:
This compiler option is not the default in gcc, nor in Xcode. You
shouldn't use it if you don't know what you are doing. The same problem
arise when you set options which change the layout or size of structs
and classes, change the size of int, the sign of char and the size of
wchar: you change the ABI which then becomes incompatible with the
standard ABI.
This *is* the same for gcc3, or any other compiler.
But I would like to emphasize, that this _ ABI issue_ has most likely
nothing to do with the original problem having runtime errors in STL.
To answer this, a bit more information is necessary.
Regards
Andreas
And once I discovered this, I then saw the help text in Xcode:
Make enums only as large as needed for the range of possible values.
[GCC_SHORT_ENUMS, -fshort-enums]
Warning: this setting generates code that may not binary compatible
with code generated without this setting or with Mac OS X frameworks.
Chris
-------------
Chris Cianflone
MakeMusic, Inc.
www.makemusic.com
-----Original Message-----
From: xcode-users-bounces+ccianflone=email@hidden
on behalf of Souvik Bose
Sent: Fri 10/21/2005 12:50 AM
To: email@hidden
Cc:
Subject: STL behaving improperly
Hi,
STL code in our XCODE project is failing at runtime whereas the same
piece of code seems to work in other compilers especially CodeWarrior.
Are there any known issues on this? If so, then, is there any
workaround
to this?
Any ideas are highly appreciated.
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
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