Board index » cppbuilder » Problem with CodeGuard and Dinkumware ofstream

Problem with CodeGuard and Dinkumware ofstream


2006-01-31 02:05:33 AM
cppbuilder61
Here is a simple code that demonstrates problem:
void __fastcall TForm1::Button2Click(TObject *Sender)
{
std::string s("Test");
std::ofstream ofs("c:\\tmp\\tmp.txt");
ofs << s;
}
When I turn on CodeGuard and execute this code I get numerous errors
like this:
1/30/2006 2:57:30 PM started a CodeGuard(tm) process: Project1.exe(1928)
Bad parameter in process: Project1.exe(1928) -
<BDS>\include\dinkumware\fstream#67
A bad file or pipe stream (0x327AEC5C) has been passed to the function.
0x0040D3E8 Call to fputc(0x54 ['T'], 0x327AEC5C)
0x0040C321 - <BDS>\include\dinkumware\fstream#67
0x0040A96A - <BDS>\include\dinkumware\fstream#269
0x00405237 - <BDS\include\dinkumware\streambuf#144
0x004038F3 - <BDS>\include\dinkumware\string#648
0x0040358A - <PROJPATH>\msxml2\Unit1.cpp#88
0x52038EF2
It all points to line 65 of file fstream which calls fputc
template<>inline bool _Fputc(char _Byte, _Filet *_File)
{ // put a char element to a C stream
return (fputc(_Byte, _File) != EOF);
}
It looks like bug inside CodeGuad to me, or is it something else?
 
 

Re:Problem with CodeGuard and Dinkumware ofstream

In article < XXXX@XXXXX.COM >,
Darko Miletic < XXXX@XXXXX.COM >wrote:
Quote
Problem with CodeGuard and Dinkumware ofstream
There is a QC report open similar to what you describe:
<qc.borland.com/wc/qcmain.aspx>
--
-David
Nihil curo de ista tua stulta superstitione.