RE: [Boost-Users] to_simple_string and Windows?
Sorry, I didn't read carefully enough. Have you managed to make a test app fail similarly? tom
-----Original Message----- From: adutoit [mailto:adutoit@stonethree.com] Sent: Tuesday, June 10, 2003 11:02 PM To: Boost-Users@yahoogroups.com Subject: Re: [Boost-Users] to_simple_string and Windows?
Yes, I know about the UNICODE project option, that is why I mentioned it in my previous email... Anyway, now I am left wondering why opto enabled (with /O3 or whatever opto is required) causes my call to "to_simple_string" to fail. In case anyone is wondering what I mean by that, it simply aborts without any further information somewhere in the bowels of said function.
A.
----------------------------------------------------------------------- DISCLAIMER: Information contained in this message and/or attachment(s) may contain confidential information of Zetec, Inc. If you have received this transmission in error, please notify the sender by return email. -----------------------------------------------------------------------
Hi.
The following little proggie bombs if I compile it with /O3 optimisation in
Windows, using Intel compiler 7.0 and STLport (whatever the latest version
number is). In short, I cannot use to_simple_string in any of my programs
if I have any form of optimisation turned on.
Here is the simple test program :
// boost
#include
Sorry, I didn't read carefully enough. Have you managed to make a test app fail similarly?
tom
-----Original Message----- From: adutoit [mailto:adutoit@stonethree.com] Sent: Tuesday, June 10, 2003 11:02 PM To: Boost-Users@yahoogroups.com Subject: Re: [Boost-Users] to_simple_string and Windows?
Yes, I know about the UNICODE project option, that is why I mentioned it in my previous email... Anyway, now I am left wondering why opto enabled (with /O3 or whatever opto is required) causes my call to "to_simple_string" to fail. In case anyone is wondering what I mean by that, it simply aborts without any further information somewhere in the bowels of said function.
A.
----------------------------------------------------------------------- DISCLAIMER: Information contained in this message and/or attachment(s) may contain confidential information of Zetec, Inc. If you have received this transmission in error, please notify the sender by return email. -----------------------------------------------------------------------
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
On Thu, 12 Jun 2003 08:33:53 +0200, adutoit wrote
Hi.
The following little proggie bombs if I compile it with /O3 optimisation in Windows, using Intel compiler 7.0 and STLport (whatever the latest version number is). In short, I cannot use to_simple_string in any of my programs if I have any form of optimisation turned on.
Unfortunately it is very hard for me to help since I
don't have your environment. Perhaps you can put some
I/O traces in to see if we can isolate where it is crashing.
Perhaps you annotate boost/date_time/date_formatting.hpp
~ line 69 in ymd_formatter, method ymd_to_string. Here's
what you are looking for. I've added a few cout's to
gather data:
static std::string ymd_to_string(ymd_type ymd)
{
typedef typename ymd_type::month_type month_type;
std::ostringstream ss;
ss << ymd.year;
std::cout << "year ok" << std::endl;
if (format_type::has_date_sep_chars()) {
ss << format_type::month_sep_char();
}
//this name is a bit ugly, oh well....
month_formatter
std::cout << to_simple_string( date( 2003,6,12) ) << std::endl;
Thx, Jeff
Yes, you are absolutely right about the environment not being the same.
There is a distinct possibility that I tweaked something somewhere which I
wasn't supposed to... And, you probably don't even use the same compiler
(Intel 7.0) and STLport as I do.
Anyway, I will put in the suggested trace output in the files you suggested,
but I will have to postpone untill I finish the coding (work) I have to
complete right now.
Thanks for the help!
Greetings,
Andre
----- Original Message -----
From: "Jeff Garland"
On Thu, 12 Jun 2003 08:33:53 +0200, adutoit wrote
Hi.
The following little proggie bombs if I compile it with /O3 optimisation in Windows, using Intel compiler 7.0 and STLport (whatever the latest version number is). In short, I cannot use to_simple_string in any of my programs if I have any form of optimisation turned on.
Unfortunately it is very hard for me to help since I don't have your environment. Perhaps you can put some I/O traces in to see if we can isolate where it is crashing. Perhaps you annotate boost/date_time/date_formatting.hpp ~ line 69 in ymd_formatter, method ymd_to_string. Here's what you are looking for. I've added a few cout's to gather data:
static std::string ymd_to_string(ymd_type ymd) { typedef typename ymd_type::month_type month_type; std::ostringstream ss; ss << ymd.year; std::cout << "year ok" << std::endl; if (format_type::has_date_sep_chars()) { ss << format_type::month_sep_char(); } file://this name is a bit ugly, oh well.... month_formatter
::format_month(ymd.month, ss); std::cout << "month format ok" << std::endl; if (format_type::has_date_sep_chars()) { ss << format_type::day_sep_char(); } std::cout << "month ok" << std::endl; ss << std::setw(2) << std::setfill('0') << ymd.day; std::cout << "day ok" << std::endl;
return ss.str(); }
Also, this shouldn't matter, but try changing your test to remove the leading '0' from the month:
std::cout << to_simple_string( date( 2003,6,12) ) << std::endl;
Thx,
Jeff
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
The following little proggie bombs if I compile it with /O3 optimisation in Windows, using Intel compiler 7.0 and STLport (whatever the latest version number is). In short, I cannot use to_simple_string in any of my programs if I have any form of optimisation turned on.
I've seen similiar problems with date time library on Intel 7.0. Upgrading to most recent compiler version fixed them.
Thanks, I will look into it!
Greetings,
Andre.
----- Original Message -----
From: "klapshin"
The following little proggie bombs if I compile it with /O3 optimisation in Windows, using Intel compiler 7.0 and STLport (whatever the latest version number is). In short, I cannot use to_simple_string in any of my programs if I have any form of optimisation turned on.
I've seen similiar problems with date time library on Intel 7.0. Upgrading to most recent compiler version fixed them.
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
participants (4)
-
adutoit
-
Jeff Garland
-
klapshin
-
Tom Matelich