C++Builder 2007 - List of Fixes from December Update

By: Chris Pattinson

Abstract: List of 46 fixes (12 from Quality Central) for C++Builder 2007 in the December Update

QC# Project Area
C++Builder Demos
Description: Steps:
Missing ShellControls source code that ships with Delphi. If you install RAD Studio or Delphi 2007, the following directory gets installed:

C:\Documents and Settings\All Users\Documents\RAD Studio\5.0\Demos\DelphiWin32\VCLWin32\ShellControls

If you just install C++ 2007, the ShellControl demo doesn't get installed.

See also: RAID 253367.
Customers upgrading from C++ Builder 6 who used the shell controls require the source to build and install the components into the IDE.

http://caseviewer.borland.com/CaseViewer/CaseDetails.jsp?caseNumber=672380

File List:

dclshlctrls.dcr
dclshlctrls.dpk
dclshlctrls.dproj
dclshlctrls.rc
dclshlctrls.res
RootEdit.dfm
RootEdit.pas
ShellConsts.hpp
ShellConsts.pas
ShellCtrls.hpp
ShellCtrls.pas
ShellReg.pas
vclshlctrls.dpk
vclshlctrls.dproj
vclshlctrls.res

UPDATE: These files should be placed in <DemoDirInstall Path>\CPP\Apps\ShellControls directory.

QC# Project Area
C++Builder Demos
Description: Steps:
An AV occurs on run when you attempt to drop a component from the shell Controls onto a form. Deleting the component from the form results in an AV in the vcl100.bpl

<details in attachment>

WORKAROUND: Turn off build with Runtime packages. Deleting though still returns an AV in vcl100.bpl
+ Go to: C:\Documents and Settings\All Users\Documents\RAD Studio\5.0\Demos\CPP\Apps\ShellControls
+ open the bcbshlctrls.bpk (it will be converted)
+ Project | Build
+ File | Close All (you can save if you want)
+ Open dclshlctrls.bpk( it will be converted)
+ Project | Build
+ Right click on the project in the PM
+ Select Install
//exp & act: successful install of the component into the tool palette

+ File | New | VCL Forms Application - C++ Builder
+ Drop TShellTreeView (or any of the shell controls found under the Samples section
+ Project | Build
+ Run | Run
//exp: Project runs with the components on the form
//act: Stops at CPU window and pressing run again results in AV:
Debugger Fault Notification
---------------------------
Project C:\Documents and Settings\testuser\My Documents\RAD Studio\Projects\test1\Debug\Project1.exe faulted with message: 'access violation at 0x00008ecf: access of address 0x00008ecf'. Process Stopped. Use Step or Run to continue.
---------------------------
OK
---------------------------

+ click OK
+ Reset the IDE
+ Go to the Form Designer
+ Delete the component
//exp: no error
//act:
---------------------------
Error
---------------------------
Access violation at address 2018B9A7 in module 'vcl100.bpl'. Read of address 00000008.
---------------------------
OK Details >>
---------------------------
<details attached in .txt file>

Workaround: Turn off build with Runtime Packages on the VCL Form application before dropping the component. Deleting the component still returns the AV though.

QC# Project Area
C++Builder Demos
Description: Steps:
Missing C++ specific Shell Control demo and package from the C++ personality delivery. Please add
bcbshlctrls.cbproj
dclshlctrls.cbproj

these should be checked in already but need to get into the build.

QC# Project Area
C++Builder Documentation
Description: Steps:
The index is missing entries in various cases. I'm not sure how widespread this is, but it might be quite common. I noticed it for new files I added in the Borland.Data.AdoDbxClientProvider namespace. In particular, the following entries are missing:

TAdoDbxCommandBuilder.Create
TAdoDbxConnection.DataSource
TAdoDbxDataAdapter.RowUpdated
TAdoDbxDataAdapter.RowUpdating
TAdoDbxDataAdapter.Create
TAdoDbxDataAdapter.HasRows
TAdoDbxParameter.SourceColumnNullMapping
1. Run help viewer.
2. Click Index tab at bottom right.
3. Enter "Borland.Data.AdoDbxClientProvider" in "Look for:" field to see entries for this namespace.

    52642

QC# Project Area
52642 C++Builder IDE
Description: Steps:
[QC Short Description]
New Forms App does not autocreate main form if autocreate forms is turned off

[QC Description]
After installing patch 3 to CB2007, a new C++ forms app no longer includes the code to autocreate the main form if autocreate forms is turned off. App will run, but main form is not displayed.

The main .cpp file that is created looks like this:

//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("Unit1.cpp", Form1);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
SetApplicationMainFormOnTaskBar(Application, true);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------

Note that there is no Application->CreateForm() call.
QC Entry 52642
Install Update 3 to CB2007 or install RAD Studio 2007 Tools | Options | Environment Options | VCL Designer | Module Creation Options | Auto create forms and data modules - uncheck this option OK File | New | VCL Forms app - C++ Run | Run Exp: Project will compile, run and display a blank main form Act: Project compiles, runs, and exits without ever showing the main form. Look at Project1.cpp file in editor Exp: File will create the main form with a line like this: Application->CreateForm(__classid(TForm1), &Form1); Act: Line to creat the main form is missing Tested in both CB 2007 + update 3 and RAD Studio 2007

QC# Project Area
C++Builder IDE\Project Management\Project Options
Description: Steps:
The -B switch (compile via assembly), when placed in "Other Options" is not passed to the compiler correctly -Open the attached project and build
//exp and act:
[BCC32 Error] AsmUnit.cpp(28): E2329 Invalid combination of opcode and operands
[BCC32 Error] AsmUnit.cpp(38): E2329 Invalid combination of opcode and operands
(these errors are due to limitations in BASM)
-Project | Options | C++ Compiler | Advanced Compilation | Other Options and add:
-B
-Build
//exp:
-B is passed to the compiler and there are no errors (TASM, not BASM is used)
//act:
It appears that .asm is generated in one step, then assembled in a separate call to TASM,
This results in many linker errors because tasm32.exe was not invoked with /ml

Also, adding #pragma inline to a file with inline asm has the same affect of
explicitly invoking tasm32.exe, e.g.
-Create a new VCL Application
-Double-click the form and add some inline assembly,e.g.
void __fastcall TForm1::FormCreate(TObject *Sender)
{
asm test eax,0
}
-Add #pragma inline at the top of the unit and build


QC# Project Area
C++Builder IDE\Code Editor
Description: Steps:
[Erreur fatale] F1009 Impossible d'ouvrir le fichier d'entrée ''

I get this error when I move the mouse cursor above code into the editor window when I have code giving the error "[BCC32 Erreur] Httpcontcod.hpp(88): E2347 Mauvaise correspondance de paramètre dans le spécificateur d'accès read de la propriété Coding" as reported in report 251066.

Attached: Screen dump and code causing that trouble.

// Francois Piette
Still in 2709.7128.2
1. unzip ics.zip in any folder. Be sure to restore directory structure.
2. open delphi\vc32\IcsBcb110.cbproj, compile and install
3. add delphi\vc32 to the path so that the components are found
4. open Cpp\Internet\Bcb2007\Bcb110Sam.groupproj
5. select and build HttpTst.exe project
=> You get the error reported in report 251066
6. In the code editor where the IDE has opened HttpContCod.hpp, let the mouse fly all over the code, you'll quickly get the error
=> [Erreur fatale] F1009 Impossible d'ouvrir le fichier d'entrée ''

QC# Project Area
C++Builder IDE\File Handling
Description: Steps:
_GetCppExplorerController is called on multiple threads, but it is clearly not a thread safe routine. FastMM reports double free attempts on a global data module variable when working with C++ modules.
Run the IDESmokeTest on a machine with dual core processor. Observe FastMM error reports when reopening a C++ project (consistently, but not 100%).

QC# Project Area
C++Builder IDE\Help
Description: Steps:
error message when pressing help button in project options for c++ app:
No help found for context
1. create new c++ console application
2. open project options
3. press help button

//exp: help shows up
//act: error msg: no help found for context

QC# Project Area
C++Builder Install
Description: Steps:
REGRESSION
If Rave is installed, prior to Nov 2007 update, path is removed when you do the Nov 2007 update. Be sure to keep the path: $(BDS)\RaveReports\Lib
If Rave is installed
------------ ORIGINAL -----------------
Build a basic C++ application with RAVE installed results in:
Unable to find package import: Rave75VCL.bpi

If you remove the reference then it builds fine.
+ Have a highlander RTM with Rave installed
+ Click Tools | options | Library - Win32
+ Examine library path
//exp & act: You will see $(BDS)\RaveReports\Lib in the list.

+ Install the Nov 2007 patch
+ Click Tools | options | Library - Win32
+ Examine library path
//exp You will continue to see $(BDS)\RaveReports\Lib in the list.
//act: Path is gone

+ File | New | VCL forms Application - C++ Builder
+ Project | Build
//exp: no errors:
// act:
Find Package Import
-------------------------------
Unable to find package import: Rave75VCL.bpi
Package Import: <edit box>
Remove this Ref? (checkbox)
-------------
Don't ask again OK Cancel Help

QC# Project Area
C++Builder VCL\Emulation Classes
Description: Steps:
From: "Daryl" <devaccount@hotmail.com>
Newsgroups: borland.public.cppbuilder.non-technical
Sent: Thursday, July 05, 2007 12:41 AM
Subject: Linker error after applying HOTFIX13

I have just applied HOTFIX13 and an application that automates EXCEL now
has
a linker error - can anyone please help with how to get rid of it.

thanks
daryl

[Linker Error] Error: Unresolved external '__fastcall
System::Variant::operator =(wchar_t *)' referenced from C:\PROGRAM
FILES\BORLAND\BDS\4.0\LIB\BCBOFFICE2K.LIB|Excel_2K_SRVR.cpp

We need to pull the office package files from the HF 13 build tree.

    20137

QC# Project Area
20137 C++Builder Compiler\C++
Description: Steps:
[QC Short Description]
[C++ Error] xmemory(53): E2045 Destructor name must match the class name

[QC Description]
Fails to compile a very basic code. See the steps for details.

QC Entry 20137

bcc32 -c 233254.cpp

//exp : clean compile
//res : errors
Error E2045 d:\borland\dexter\include\dinkumware\xmemory 53: Destructor name must match the class name in function void
_Destroy<complex<float> >(complex<float> *)
Error E2045 d:\borland\dexter\include\dinkumware\xmemory 53: Destructor name must match the class name in function void
_Destroy<complex<float> >(complex<float> *)

pointing at this
template<class _Ty> inline
void _Destroy(_Ty *_Ptr)
{
(_Ptr)->~_Ty();
}

    51456

QC# Project Area
51456 C++Builder Compiler\C++
Description: Steps:
[QC Short Description]
Internal Compiler error

[QC Description]
Compiling file, ClassFileStream.cpp(429) Internal compiler error at 0x609ec22 with base 0x6010000

QC Entry 51456

5.6.1: compiles fine
5.8.3.1 : compiles fine
5.9.1: compiles fine (rev 107)
5.9.2 ICE (cppbinaries rev 118)
5.A ICE
VIEW COMMENT for simplify steps



1.bcc32 -D_DEBUG;NO_STRICT;_RTLDLL -vG -c -v -w- ClassFileStream.cpp

[ if -vG AND __RTLDLL is removed from the command line then there is no ICE ]

CodeGear C++ 5.92 for Win32 Copyright (c) 1993, 2007 CodeGear
..\Common\ClassFileStream.cpp:
Fatal F1004 \ClassFileStream.cpp 429: Internal compiler error at 0x4931
96 with base 0x400000 in function FileStream::Open(const char *,const char *,bool)
Fatal F1004 ..\Common\ClassFileStream.cpp 429: Internal compiler error in function FileStream::Open(const char *,const char *,bool)



OLD STEPS
Using subversion download the open source project


http://code.google.com/p/crylib/source version 99. (latest as of this time).

Open the classbuilder project (CryLib\crylib\src\Borland) and build it.

The code looks pretty simple to me. But it dies consistantly at this point.

QC# Project Area
C++Builder Compiler\C++\Front End
Description: Steps:
New Plum Hall test fails
342Y2_13c_s

ADL test fails to compile
1. bcc32 -c -A 242887.cpp
//exp : clean compile
//res :
Error E2268 242887.cpp 28: Call to undefined function 'f' in function main()

QC# Project Area
C++Builder Compiler\C++\Front End
Description: Steps:
we don't detect the presence of a copy constructor that takes a cosnt reference if a copy constructor that takes a nonconst reference is present. 1. bcc32 -c 230383.cpp

//exp : clean compile
//res : error
Error E2285 230383.cpp 14: Could not find a match for 'ap::ap(const ap&)' in function main()

2. bcc32 -c -DWORKAROUND 230383.cpp
//this works

QC# Project Area
C++Builder Compiler\C++\Front End\Exception Handling
Description: Steps:
Attempt to destroy invalid object when an exception is thrown after new'ing an object and creating a stack based object in a constructor. 1. bcc32 239998.cpp
2. 239998.exe

//exp : constructor and destructor counts and addresses match
//res :
operator new() returned 008733F8
Class2 at 0012FF08
operator new() returned 00873424
throw
~Class3 at 00873424 (invalid, object does not exist)

Ctor/dtor counts match.
Ctor/dtor addresses DO NOT match.

QC# Project Area
C++Builder Compiler\C++\Front End\Exception Handling
Description: Steps:
Plumhall c++ _154Y15F


worked fine with svnversion 22005
fails with 22037
C:\TESTSCPP\bcc\harness\bcctests>bcc32 -I%PHSRC%;%PHDST%;plumhall/conform plumhall\conform\t15b.dir\_154Y15f.cpp
CodeGear C++ 5.A0 for Win32 Copyright (c) 1993, 2007 CodeGear
plumhall\conform\t15b.dir\_154Y15f.cpp:
Turbo Incremental Link 5.80 Copyright (c) 1997-2007 CodeGear

C:\TESTSCPP\bcc\harness\bcctests>bcc32 -v -I%PHSRC%;%PHDST%;plumhall/conform pl
umhall\conform\t15b.dir\_154Y15f.cpp
CodeGear C++ 5.A0 for Win32 Copyright (c) 1993, 2007 CodeGear
plumhall\conform\t15b.dir\_154Y15f.cpp:
Turbo Incremental Link 5.80 Copyright (c) 1997-2007 CodeGear

C:\TESTSCPP\bcc\harness\bcctests>svnversion
22005M

    4662

QC# Project Area
4662 C++Builder Compiler\C++\Front End\Exception Handling
Description: Steps:
[QC Short Description]
exception in loop

[QC Description]
Incorrect sequence catch.
see Steps
QC Entry 4662

void try_test() {
try {
for(int i = 0; ; i++) {
try {
break;
} catch(exception &e) { // we break to here
cout<<"exception in loop"<<endl;
if(i > 10)
throw;
}
}
ThrowMyException();
} catch(exception &e) {
cout<<"to catch a exception"<<endl;
}
}
1. bcc32 237281.cpp
2. 237281.exe
//exp :
to catch a exception

//res :
exception in loop
exception in loop
exception in loop
exception in loop
exception in loop
exception in loop
exception in loop
exception in loop
exception in loop
exception in loop
exception in loop
exception in loop
to catch a exception


QC# Project Area
C++Builder Compiler\C++\Front End\Exception Handling
Description: Steps:
Runtime bug in exception handling. Four objects are constructed, only three are destructed. The last object is never destroyed, which could have extremely serious consequences, depending on behavior of object destructor.

Output:

D:\bugs>bug19
Object constructor: 0012FF80
Object constructor: 0012FF58
Copy constructor0012FF50
Copy constructor007D340E
destructor: 0012FF58
destructor: 007D340E
destructor: 0012FF80
1


The final int in the output is the number of undestroyed objects.


One interesting result I found by experimentation is that if the constructor of Object takes a char const * instead of the std::string reference, the leak is gone!

(What's the parameter got to do with cleanup?)

The worst part about this is that the leak is very subtle, and most people wouldn't notice that it's not destructing the object, but may wonder why their application is behaving oddly.

(Does this belong in "backend" category?)
bcc32 120869.cpp
120869.exe
//res:
Object constructor: 1245056
Object constructor: 1244984
Copy constructor1244976
Copy constructor10501574
destructor: 10501574
destructor: 1245056
2
//exp:
Object constructor: 0012FF6B
Object constructor: 0012FF27
Copy constructor0012FF07
destructor: 0012FF27
destructor: 0012FF07
destructor: 0012FF6B
0

QC# Project Area
C++Builder Compiler\C++\Front End\Exception Handling
Description: Steps:
Destructor is never called for a static object constructed before a dynamic object that throws an exception in its constructor. bcc32 77585.cpp
77585.exe

//act:
MyObject ctor: 1245056
MyThrower dtor: 8074056
Caught const char *
MyObject dtor: 1245056

//exp:

MyObject ctor: 1245036
Caught const char *
MyObject dtor: 1245036

QC# Project Area
C++Builder Compiler\C++\Front End\Exception Handling
Description: Steps:
attached code incorrectly calls the desctructor of a partially constucted object when an exception is thrown. 1. bcc32 218689.cpp
2. 218689.exe

//exp : output :
BEGIN
END

//res : output :
BEGIN
ERROR CALL !!!
END

QC# Project Area
C++Builder Compiler\C++\Front End\Exception Handling
Description: Steps:
This code gets an access violation because of invalid stack unwinding. bcc32 168852.cpp
168852.exe
//act: crashes
//exp: runs, returns 0

QC# Project Area
C++Builder Compiler\C++\Front End\Exception Handling
Description: Steps:
Returning a local object and binding a const reference to the return is this case causes a runtime crash.
//#define TRACE_UNWIND_BUG

#ifdef TRACE_UNWIND_BUG
#include <iostream>
#include <iomanip>
using namespace std;
#endif

class foo
{
public:
foo();
foo(const foo&);
~foo();

enum { data_size = 10000 };

private:
foo& operator=(const foo&);

#ifndef TRACE_UNWIND_BUG
private:
char* data;
#endif
};

foo::foo()
#ifndef TRACE_UNWIND_BUG
: data(new char[data_size])
#endif
{
#ifdef TRACE_UNWIND_BUG
cout << "foo::foo(\"this = 0x" << hex << this << ")" << endl;
#endif
}

foo::foo(const foo&)
#ifndef TRACE_UNWIND_BUG
: data(new char[data_size])
#endif
{
#ifdef TRACE_UNWIND_BUG
cout << "foo::foo(const foo&\"this = 0x" << hex << this << ")" << endl;

#endif
}

foo::~foo()
{
#ifdef TRACE_UNWIND_BUG
cout << "foo::~foo(\"this = 0x" << hex << this << ")" << endl;
#else
for(unsigned i = 0; data_size != i; ++i) {
data[i] = i % 128;
}
delete [] data;
#endif
}

foo get_foo()
{
return foo();
}

void test_unwind(unsigned i)
{
foo f1;
if(0 == i) {
const foo& f2 = get_foo();
#ifdef TRACE_UNWIND_BUG
cout << "throw" << endl;
#endif
throw 1;
}
foo f3;
test_unwind(--i);
}

int main()
{
try {
test_unwind(2);
}
catch(...) {
}
}
bcc32 -DTRACE_UNWIND_BUG 159056.cpp
159.056.exe
//act:
foo::foo("this = 0x12ff48)
foo::foo("this = 0x12ff40)
foo::foo("this = 0x12fef8)
foo::foo("this = 0x12fef0)
foo::foo("this = 0x12fea8)
foo::foo("this = 0x12fe98) <====
throw
foo::~foo("this = 0x12fea0) <====
foo::~foo("this = 0x12fea8)
foo::~foo("this = 0x12fef0)
foo::~foo("this = 0x12fef8)
foo::~foo("this = 0x12ff40)
foo::~foo("this = 0x12ff48)
< then may crash with AV >
//exp: (from VC6)
foo::foo("this = 0x0012FF44)
foo::foo("this = 0x0012FF48)
foo::foo("this = 0x0012FF18)
foo::foo("this = 0x0012FF1C)
foo::foo("this = 0x0012FEEC)
foo::foo("this = 0x0012FEE4)
throw
foo::~foo("this = 0x0012FEE4)
foo::~foo("this = 0x0012FEEC)
foo::~foo("this = 0x0012FF1C)
foo::~foo("this = 0x0012FF18)
foo::~foo("this = 0x0012FF48)
foo::~foo("this = 0x0012FF44)

    20386

QC# Project Area
20386 C++Builder Compiler\C++\Front End\Language
Description: Steps:
[QC Short Description]
The alternative tokens "and", "or" and "not" etc. are missing.

[QC Description]
The alternative tokens "and", "or" and "not" etc. are missing.

According to the C++ standard, section 2.6, they are required.
QC Entry 20386
python runplumhall -d 25Y22a

QC# Project Area
C++Builder Compiler\C++\Front End\Language
Description: Steps:
Note that this is a duplicate of 6564. I take this as a suggestion that this should work even without -A.
--- original text ---
The current C++ specification indicates that static arrays of char (i.e., string literals) decay to const char*. In Thunder, they're still char*.
[ANSI]
Original WebBTS #: 6709

void foo(char*) { cout << "char*" << endl; }
void foo(const char*) { cout << "const char*" << endl; }

int main(int, char **)
{
foo("hello");
}

    18519

QC# Project Area
18519 C++Builder Compiler\C++\Front End\Language
Description: Steps:
The compiler doesn't allow static_cast<void *>(p) where p is a pointer to an incomplete type. [QC Entry 18519] 1. bcc32 -c t.cpp
exp: compile to succeed
act: error in function f2.

    18729

QC# Project Area
18729 C++Builder Compiler\C++\Front End\Preprocessor
Description: Steps:
Using -Sd with CPP32 the first few lines of the file (showing builtin defines) are only terminated with a newline while the rest of the file uses carriage return/newline. [QC Entry 18729] cpp32 -Sd 62191.c
tdump -h 62191.i | grep "2F 0A 2F"
//res:
{ many lines with the pattern "2F 0A 2F" /<LF>/ }

//exp:
{ no lines matching pattern "2F 0A 2F" }

    18982

QC# Project Area
18982 C++Builder Compiler\C++\Front End\Templates
Description: Steps:
BCB doesn't allow pointers to members to be used as template parameters. [QC Entry 18982] new steps:

1. bcc32 61808.cpp

//exp: clean compile
//res :
Error E2272 61808a.cpp 14: Identifier expected in function main()
Error E2188 61808a.cpp 14: Expression syntax in function main()
Error E2299 61808a.cpp 14: Cannot generate template specialization from 'Bar<T>' in function main()
Error E2379 61808a.cpp 16: Statement missing ; in function main()
*** 4 errors in Compile ***



QC# Project Area
C++Builder Compiler\C++\Front End\Templates
Description: Steps:
Boost library finds that template function type deduction does not omit top-level constness as it should:

template<class T>
void f(T x)
{
x = 1; // works
(void) &x;
T y = 17;
y = 20; // "Cannot modify a const object in function f(int)"
(void) &y;
}

int main()
{
const int i = 17;
f(i);
}
bcc32 -c 123610.cpp
//act:
Error E2024 123610.cpp 7: Cannot modify a const object in function f<const int>(int)

//exp: no diagnostics

    18649

QC# Project Area
18649 C++Builder Compiler\C++\Front End\Templates
Description: Steps:
The compiler will not call an explicit specialization of a function template for const char * types. [QC Entry 18649] bcc32 76968.cpp
76968.exe
//res:
Hey, you just called the primary template
15
Hey, you just called the primary template
bob
failed

//exp:
Hey, you just called the primary template
15
Special version for const char *
hello
passed

QC# Project Area
C++Builder Compiler\C++\Front End\Initialization
Description: Steps:
Ansi C++ 12.8(3) says that " A member function template is never instantiated to perform the copy of a class object to an object of its class type"

While testing this using the given example, compiler
reports "no error" where it should.

Note: cl pass
bcc fail
gcc pass
bcc32 93260.cpp
//res:
no error
//exp:
93260.cpp(6) : error C2893: Failed to specialize function template '__thiscall S::S(T)'
With the following template arguments: 'struct S'

    18784

QC# Project Area
18784 C++Builder Compiler\C++\Front End\Overloading
Description: Steps:
BCB doesn't find the conversion sequence Foo -> void (Foo::*)() -> bool in the following code.
struct Foo;
typedef void (Foo::*FooP)();

struct Foo
{
operator FooP(){};
};

int main()
{
Foo foo;
foo || true;
true || foo;
return 0;
} [QC Entry 18784]
bcc32 64564.cpp
//res:
Error E2094 64564.cpp 12: 'operator||' not implemented in type 'Foo' for arguments of type 'bool' in function main()
Error E2096 64564.cpp 13: Illegal structure operation in function main()

//exp: no errors

    18637

QC# Project Area
18637 C++Builder Compiler\C++\Front End\Overloading
Description: Steps:
ANSI 13.5.3 section 2. The code in the standard is not correctly executed. Specifically, the statement
dobj1 = dobj2; is supposed to call the implicitly generated operator=(const D&) but it incorrectly calls the user-defined operator(const B&).

struct B {
virtual int operator= (int) { }
virtual B& operator= (const B&) { }
};
struct D : B {
virtual int operator= (int) { }
virtual D& operator= (const B&) { }
};

int main (void) {
D dobj1;
D dobj2;
B* bptr = &dobj1;
bptr->operator=(99); // calls D::operator=(int)
*bptr = 99; // ditto
bptr->operator=(dobj2); // calls D::operator=(const B&)
*bptr = dobj2; // ditto

// **** BCB doesn't do the following correctly ****
dobj1 = dobj2; // calls implicitly ­declared
// D::operator=(const D&)
} [QC Entry 18637]
Paste the following code into a console application. Notice that the final line of main executes the wrong operator=.

struct B {
virtual int operator= (int) { }
virtual B& operator= (const B&) { }
};
struct D : B {
virtual int operator= (int) { }
virtual D& operator= (const B&) { }
};

int main (void) {
D dobj1;
D dobj2;
B* bptr = &dobj1;
bptr->operator=(99); // calls D::operator=(int)
*bptr = 99; // ditto
bptr->operator=(dobj2); // calls D::operator=(const B&)
*bptr = dobj2; // ditto

// **** BCB doesn't do the following correctly ****
dobj1 = dobj2; // calls implicitly ­declared
// D::operator=(const D&)
}

QC# Project Area
C++Builder RTL\Delphi
Description: Steps:
Adding a Form to a library results in a compiler error

// works in BCB6
Create a new C++ library
add a form
build

[C++ Error] Project1.cpp(1): E2303 Type name expected
[C++ Error] Project1.cpp(1): E2034 Cannot convert 'char *' to 'int'
[C++ Error] Project1.cpp(1): E2293 ) expected

QC# Project Area
C++Builder RTL\C++
Description: Steps:
setjmp() isn't available as a macro

C++ 17.4.1.2.5

Names which are defined as macros in C shall be defined as macros in the C++ Standard Library, even if C grants license for implementation as functions. [ Note: the names defined as macros in C include the following: assert, offsetof,setjmp, va_arg, va_end, and va_start. -- end note ]
bcc32 -c 248623.cpp
Should compile

QC# Project Area
C++Builder RTL\C++
Description: Steps:
Plum Hall test fails to compile
_214Y21db

// snip

#define CSTD std::
#include <cstdio>

int main()
{
CSTD FILE *tf = CSTD fopen("foo.txt", "w+");
CSTD feof(tf); // error here
return 0;
}


// QA notes:
been busted since BCB6
Comeau doesn't like it
VC has deprecated fopen
1. bcc32 -c -w- 243601.cpp

//exp : clean compile
//res :

Error E2272 243601.cpp 12: Identifier expected in function main()
Error E2379 243601.cpp 12: Statement missing ; in function main()

//note: erroneous line expands to
std:: ((tf)->flags & 0x0020);

QC# Project Area
C++Builder RTL\C++
Description: Steps:
errno is not available in <cerrno>.

C++ 19.3.2
The contents are the same as the Standard C library header <errno.h>, except that errno shall be defined as a macro.
bcc32 -c 248624.cpp
Should compile

    52778

QC# Project Area
52778 C++Builder RTL\C++\STL
Description: Steps:
[QC Short Description]
<vector> calls undefined function '_Debug_get_cont'

[QC Description]
The Dinkumware vector header calls the undefined function _Debug_get_cont if iterator debugging is enabled.

Compile the following program:

#define _HAS_ITERATOR_DEBUGGING 1
#include <vector>

int main ()
{
std::vector<int> v, v2;
v.insert(v.begin(), v2.begin(), v2.end());
}

QC Entry 52778
Download attachment bcc32 -c qc52778.cpp Expected: clean compile Actual results: Error E2268 C:\Program Files\CodeGear\RAD Studio\5.0\\Include\dinkumware\vector 805: Call to undefined function '_Debug_get_cont' in function void vector<int,allocator<int> >::_Insert<_Vector_iterator<int,allocator<int> > >(_Vector_iterator<int,allocator<int> >,_Vector_iterator<int,allocator<int> >,_Vector_iterator<int,allocator<int> >,forward_iterator_tag) Error E2034 C:\Program Files\CodeGear\RAD Studio\5.0\\Include\dinkumware\vector 805: Cannot convert 'int' to 'vector<int,allocator<int> > *' in function void vector<int,allocator<int> >::_Insert<_Vector_iterator<int,allocator<int> > >(_Vector_iterator<int,allocator<int> >,_Vector_iterator<int,allocator<int> >,_Vector_iterator<int,allocator<int> >,forward_iterator_tag)

QC# Project Area
C++Builder RTL\C++\STL
Description: Steps:
Numerous warnings in the dinkumware headers when compiling with -vi- -w. //simple case:
bcc32 -vi- -w 222801a.cpp

//original case from real world:
bcc32 -vi- -w 222801.cpp
//res:
222801.cpp:
Warning W8013 c:\dev\bds\4.0\include\dinkumware\xutility 438(3): Possible use of
'_Cat' before definition in function std::_Ptr_cat(bool *,bool *)
Warning W8013 c:\dev\bds\4.0\include\dinkumware\xutility 444(3): Possible use of
'_Cat' before definition in function std::_Ptr_cat(const bool *,bool *)
Warning W8013 c:\dev\bds\4.0\include\dinkumware\xutility 450(3): Possible use of
'_Cat' before definition in function std::_Ptr_cat(char *,char *)
Warning W8013 c:\dev\bds\4.0\include\dinkumware\xutility 456(3): Possible use of
'_Cat' before definition in function std::_Ptr_cat(const char *,char *)
.
.
.
//exp: no diagnostics

QC# Project Area
C++Builder RTL\C++\STLPort
Description: Steps:
[STL]
While testing the effects of basic_filebuf::overflow on codecvt, bcc32 returns error.
bcc32 t70.cpp
//res: The test failed
//exp: The test passed

QC# Project Area
C++Builder RTL\C++\STLPort
Description: Steps:
[STL]
ANSI C++ 27.6.2.5.3 says that " The effect of basic_ostream::operator<< is call pf(*this)"

It seems that while throwing exception, the value
which was incremented, does NOTactually get incremented during catch.

While testing this STLPort fails the test.

This error did not occur for RW STL. There is one
test which skipped due to this error.
bcc32 t49.cpp
//act: t49.exe

//res: The test failed
//exp: The test passed

QC# Project Area
C++Builder RTL\C++\STLPort
Description: Steps:
[STL]
While testing the effects of money_put::do_put with long value, in Ansi C++ Ch22, bcc32 differs in resulted values.
bcc32 t55.cpp
//res: The test passed
//exp: The test failed

QC# Project Area
C++Builder Modeling
Description: Steps:
Exception appears after switching to Model View mode



[saa] It reproductible only on my computer. I couldn't reproduce this problem on virtual machines
1. Create new C++ project (Console application)
2. Click to Model View-> Add Model Support Window appears-> Click yes and then choose default settings-> Click ok->
Exception appears

[vkarjakin]
Attached is Projects folder for this Exception. Clean (or rename) your C:\Documents and Settings\<your account>\My Documents\RAD Studio\Projects folder and extract to this folder attached content. You will receive this Exception. The problem is in the infinite loop because the subdirectory has the same name as the project root directory (Borland.SCI.Impl.Cpp.CppProjectStructure class uses short names by the Projects folder parsing)!
Such situation can be repeated in many projects because of many reasons.

QC# Project Area
C++Builder Modeling
Description: Steps:
C++ Builder: Diagram should be updated after changing in the code inheritance list. Now Reload is required.

[Highlander Update]

Rev. 9858
1. add following code to the C++ project:
class A{};
class B{};
class C{};
2. check that all 3 classes are shown in the diagram
3. in the code make class A as parent of class C:
class C : A {};
4. switch to the diagram - ok, generalization link is drawn.
5. now in the code changed parent class to B:
class C : B{};
6. go to the diagram - the link is still drawn from C to A. Update (F5) doesn't help. Only after project reload the link is drawn as expected - from C to B.

QC# Project Area
C++Builder Modeling\SCI
Description: Steps:
Old class stays in the model after having been completely replaced by a new one.

[Highlander Update]
* new C++ console application (options: C++, no VCL, no Multi Threaded)
* add modeling support
* put the following code in the main.cpp

class a {
void f();
};
void a::f()
{}

* go to model tree
// act:
the class a is there
* go to the source code and replace both references to `a' with `b'
* go to model tree
// act:
both the class `a' and the class `b' are there but only the latter contains the method f()
------------------------------
Changed steps in build 2789.8895.1:
1. create vcl c++ project
2. add modeling
3. add a function to the class TForm1 with implementation out of class declaration - I'm not sure this step is essential.
4. check the class with new function is shown in the diagram and in the model tree
5. Go to the code and change class name from TForm1 to e.g. Taa - in unit1.cpp 4 times and in project1.cpp in USEFORM("Unit1.cpp", aa) (essential!) and in another line below (not really important)
6. Go to the diagram and see that 2 classes are shown TForm1 and Taa, ModelTree as well contains both classes. Only one class Taa should be shown.
7. After Project Reload extra TForm1 class disappears.

QC# Project Area
C++Builder Modeling\MDL Import
Description: Steps:
Access violation when modelisation convertion is cancelled
once it is hit the error comes back in a loop - i have to kill bds.exe

[vk] The same problem in all projects in the section "Design Projects": UML1.5 Project, UML1.5 Project, etc. Here are 2 bugs
1) All design projects must be presented in all Architect shortcuts (CBuilder, Delphi, DelphiDotNet)
2) Design projects should be open without Exceptions

[Highlander Update]
1. French Pro hihglander is installed
2. start C++ builder
3. Fichier | Nouveau | autre (file | new|other)
4. projects de modelisation
5. Convertir depuis MDL
6. keep default settings - click OK
7. Annuler (cancel)

Error window access violation in dotnetcoreide100.bpl

[21E70B6C]{dotnetcoreide100.bpl} DotNetProject.TReferencesCategory.GetIndex (Line 3105, "DotNetProject.pas" + 3) + $7
[2098434A]{coreide100.bpl} ProjectFrm.TProjectManagerForm.ProjectTree2GetImageIndex (Line 1333, "ProjectFrm.pas" + 22) + $10
[20E77C08]{vclide100.bpl} IDEVirtualTrees.TBaseVirtualTree.DoGetImageIndex (Line 18527, "idevirtualtrees.pas" + 8) + $19
[20E7A20B]{vclide100.bpl} IDEVirtualTrees.TBaseVirtualTree.GetImageIndex (Line 20032, "idevirtualtrees.pas" + 6) + $25
[20E838B0]{vclide100.bpl} IDEVirtualTrees.TBaseVirtualTree.PaintTree (Line 27023, "idevirtualtrees.pas" + 217) + $27
[20E7CB80]{vclide100.bpl} IDEVirtualTrees.TBaseVirtualTree.Paint (Line 21712, "idevirtualtrees.pas" + 16) + $17
[20145563]{vcl100.bpl } Controls.TCustomControl.PaintWindow (Line 10157, "Controls.pas" + 6) + $5
[20140825]{vcl100.bpl } Controls.TWinControl.PaintHandler (Line 7367, "Controls.pas" + 4) + $14
[20140FF8]{vcl100.bpl } Controls.TWinControl.WMPaint (Line 7560, "Controls.pas" + 6) + $5
[201454FC]{vcl100.bpl } Controls.TCustomControl.WMPaint (Line 10146, "Controls.pas" + 2) + $4
[20E748F1]{vclide100.bpl} IDEVirtualTrees.TBaseVirtualTree.WMPaint (Line 16412, "idevirtualtrees.pas" + 8) + $4
[2013C4F3]{vcl100.bpl } Controls.TControl.WndProc (Line 5146, "Controls.pas" + 83) + $6
[20031615]{rtl100.bpl } Classes.TList.Delete (Line 2945, "common\Classes.pas" + 9) + $8
[200318DD]{rtl100.bpl } Classes.TList.Remove (Line 3081, "common\Classes.pas" + 3) + $4
[20140673]{vcl100.bpl } Controls.TWinControl.WndProc (Line 7304, "Controls.pas" + 111) + $6
[20D1972A]{designide100.bpl} DeskUtil.SetFocusHook (Line 435, "DeskUtil.pas" + 4) + $C
[20E7EB5A]{vclide100.bpl} IDEVirtualTrees.TBaseVirtualTree.WndProc (Line 23133, "idevirtualtr

Server Response from: ETNASC01