• 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
string::stringstream broken with gg 4.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

string::stringstream broken with gg 4.2


  • Subject: string::stringstream broken with gg 4.2
  • From: Gabriel Beauchemin <email@hidden>
  • Date: Sat, 17 Oct 2009 08:46:52 -0400

The following will not work properly when compiled with gcc 4.2 (10.5 or 10.6 sdk).
I've also disabled
_GLIBCXX_DEBUG=0
_GLIBCXX_DEBUG_PEDANTIC=0

Only the << char* work. Known regression ?

Thanks

#include <sstream>
#include <iostream>

int main()
{
std::ostringstream stm;
// Output a char*
stm << "###";
// Output an int
stm << 31;
// Output a char
stm << '$';
// Output a double
stm << 9.87654;

// Retrieve the resulting string
std::cout << stm.str() << std::endl;
}

running with gcc 4.0 -> ###31$9.87654
running with gcc 4.2 -> ###
 _______________________________________________
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: string::stringstream broken with gg 4.2
      • From: Todd Heberlein <email@hidden>
    • Re: string::stringstream broken with gg 4.2
      • From: Luca Ciciriello <email@hidden>
  • Prev by Date: Re: error trying to save in Coredata
  • Next by Date: Re: string::stringstream broken with gg 4.2
  • Previous by thread: GenerateDSYMFile fails on Leopard
  • Next by thread: Re: string::stringstream broken with gg 4.2
  • Index(es):
    • Date
    • Thread