473,513 Members | 3,569 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is this a STLport bug

vc8 + STLport 5.1.3:

cout << fixed << numeric_limits<double>::max();

It result a runtime error.

Sep 22 '07 #1
5 1504
Aman JIANG wrote:
vc8 + STLport 5.1.3:

cout << fixed << numeric_limits<double>::max();

It result a runtime error.
Have you tried debugging it? I don't have STLport (nor do I
intend to use it) but it should be fairly easily to step into
the operator<<, I would think... VC++ has a very good debugger
it would be a shame not to use it...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 22 '07 #2

Victor Bazarov wrote in message...
Aman JIANG wrote:
vc8 + STLport 5.1.3:

cout << fixed << numeric_limits<double>::max();

It result a runtime error.

Have you tried debugging it? I don't have STLport (nor do I
intend to use it) but it should be fairly easily to step into
the operator<<, I would think... VC++ has a very good debugger
it would be a shame not to use it...
It has nothing to do with STL/Standard C++ Lib. It's a bug in MSVCRT.DLL.

The biggest number you can print out (directly) on window$ in 'fixed' format
is:

double tmp( std::numeric_limits<double>::max() / 1.0e+276 );
std::cout << std::fixed << tmp;

Change that magic-number to '275' and BANG.

The whole '*.max()' will print on GNU/Linux (and probably others).

[ those were my findings on an Pentium4/win98se/GCC(MinGW)3.3.1. ]
--
Bob R
POVrookie
Sep 22 '07 #3
On Sep 23, 12:10 am, "BobR" <removeBadB...@worldnet.att.netwrote:
Victor Bazarov wrote in message...
Aman JIANG wrote:
vc8 + STLport 5.1.3:
cout << fixed << numeric_limits<double>::max();
It result a runtime error.
Have you tried debugging it? I don't have STLport (nor do I
intend to use it) but it should be fairly easily to step into
the operator<<, I would think... VC++ has a very good debugger
it would be a shame not to use it...

It has nothing to do with STL/Standard C++ Lib. It's a bug in MSVCRT.DLL.

The biggest number you can print out (directly) on window$ in 'fixed' format
is:

double tmp( std::numeric_limits<double>::max() / 1.0e+276 );
std::cout << std::fixed << tmp;

Change that magic-number to '275' and BANG.

The whole '*.max()' will print on GNU/Linux (and probably others).

[ those were my findings on an Pentium4/win98se/GCC(MinGW)3.3.1. ]
--
Bob R
POVrookie
Thank you.
But if I use vc8's STL it will works fine :(

Sep 22 '07 #4
On Sep 22, 10:27 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
Aman JIANG wrote:
vc8 + STLport 5.1.3:
cout << fixed << numeric_limits<double>::max();
It result a runtime error.

Have you tried debugging it? I don't have STLport (nor do I
intend to use it) but it should be fairly easily to step into
the operator<<, I would think... VC++ has a very good debugger
it would be a shame not to use it...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Thank you.
My question was just about the bug, and was there a bug,
but not about debug.

Sep 22 '07 #5
On 2007-09-22 10:46, Aman JIANG wrote:
vc8 + STLport 5.1.3:

cout << fixed << numeric_limits<double>::max();

It result a runtime error.
It works just fine if you use the STL that comes with VS, so the bug
must be with STLPort, for more information ask in a group discussing
STLPort.

--
Erik Wikström
Sep 22 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3250
by: Gary | last post by:
I am trying to compile the STLPORT 4.5.3 using g++ 3.3 compiler on sun. I have modified the stl_gcc.h file to point to the correct include path for the compiler. I am getting the following errors: In file included from /opt/nortel/gcc-3.3/backward/iostream.h:31, from /export/home/rch034/garyla/stlport/wrap_std/h/iostream.h:5, from...
4
1663
by: Icosahedron | last post by:
I'm sure it's been done. I'm sure that I'm an idiot for even asking the question, but has anyone been successful in getting Comeau 4.3.0.1 to compile STLPort, or even use STLPort in a program (using the MSVC7 backend, I should state)? There doesn't seem to be any out of the box support for Comeau on Win32/MSVC7 in STLPort, but that's...
1
1942
by: pervinder | last post by:
Hi, When i link a C++ test app with stlport, it throws some errors on AIX like Linking ../../output/AIX_32/bin/test "/hm/test/stlport/stl/_fstream.h", line 30.11: 1540-0836 (S) The #include file <stl/_streambuf.h> is not found. "/hm/test/stlport/stl/_fstream.h", line 34.10: 1540-0836 (S) The #include file <stl/_istream.h> is not found....
2
2029
by: programmer_pete | last post by:
I am trying to switch to STLPort 4.6.2 from the MSVC STL. My project uses Spirit 1.6.0 and MSVC++ 6. I have configured STLPort as follows: #define _STLP_NO_OWN_IOSTREAMS 1 #define _STLP_USE_OWN_NAMESPACE 1 #define _STLP_REDEFINE_STD 1 In other words, STLPort is configured to used MSVC's iostreams.
1
1986
by: Boris | last post by:
Hi, I'm using STLport-4.5.3 with Visual C++ 6.0 on Windows XP. It seems, the module built requires MSVCP60.DLL - which (mostly) contains Streams implementation by Microsoft. So, STLport falls back on Microsoft implementation of STL for Streams support. That Microsoft DLL is ~ 500K in size...because my app is deployed over Internet, these...
7
1891
by: Gernot Frisch | last post by:
Hi, we have to use stlport here, but With a code like this: void DoSomething(int english_version) { // make no use of english_version }
1
6302
by: PangFromChina | last post by:
Platform:window 2000 professional, VC++6.0 +SP5 STLport: STLport 5.0.2 While test STLport following "STLport README for Microsoft Visual C++ compilers." of README.msvc(readme.txt), there is a error:NMAKE: fatal error U1077: 'cl': return code '0x2'stop. I can build STLport without any error but a warning, after buiding I test it, a error...
2
3049
by: Artur Bac | last post by:
I got a problem with eVc4 i STLPort and i dont known why c:\stlport-5.0.2\stlport\stl\_construct.h(115) : error C2665: 'new' : none of the 2 overloads can convert parameter 2 from type 'struct ns::CPointT<short*' c:\stlport-5.0.2\stlport\stl\_vector.h(351) : see reference to function template instantiation 'void __cdecl...
0
2330
by: francois.cppdevs | last post by:
Hi C++ supporters I just wanted to let you know that STLport 5.1.0 has been released, it is available here: https://sourceforge.net/projects/stlport/ Since 5.0 this library implements some interesting (and original I hope) features like: - template expression for string concatenation (activable through
0
7270
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7563
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7125
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5703
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.