atlvcl.h doesn't support "nested comments" compiler setting?


2005-05-10 07:04:49 AM
cppbuilder85
Hi, Group. I've searched QC and the web for this. Posting it here first to check if anyone has already noticed this.
In the file ($BCB)\Include\Atl\atlvcl.h, line 446, we see this:
(...)
/* Get Provider(const ProviderName: string); TCustomProvider; virtual;
}
/* IDataBroker support */
(...)
This code won't compile if you enable Project->Options->Advanced Compiler->Nested Comments
Try to compile this source code to reproduce the error:
//---------------------------------------------------------------------------
#include <Atl\atlvcl.h>
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
int main(int argc, char* argv[])
{
return 0;
}
//---------------------------------------------------------------------------
You should get the following errors:
Build
[C++ Warning] atlwin.h(1579): W8017 Redefinition of 'MESSAGE_HANDLER' is not identical
Full parser context
Unit1.cpp(3): #include D:\Leng\C\CppBuilder6\include\Atl\atlvcl.h
atlvcl.h(35): #include D:\Leng\C\CppBuilder6\include\atl\atlmod.h
atlmod.h(335): #include D:\Leng\C\CppBuilder6\include\atl\atlctl.h
atlctl.h(18): #include D:\Leng\C\CppBuilder6\include\atl\atlwin.h
atlwin.h(90): namespace ATL
[C++ Error] c on line 446
Full parser context
Unit1.cpp(3): #include D:\Leng\C\CppBuilder6\include\Atl\atlvcl.h
atlvcl.h(218): class IAppServerImpl<DM,T,Intf,piid,plibid>
[C++ Error] atlvcl.h(1379): E2187 Unexpected end of file in conditional started on line 11
Full parser context
Unit1.cpp(3): #include D:\Leng\C\CppBuilder6\include\Atl\atlvcl.h
atlvcl.h(218): class IAppServerImpl<DM,T,Intf,piid,plibid>
[C++ Warning] atlvcl.h(1379): W8062 Previous options and warnings not restored
Full parser context
Unit1.cpp(3): #include D:\Leng\C\CppBuilder6\include\Atl\atlvcl.h
atlvcl.h(218): class IAppServerImpl<DM,T,Intf,piid,plibid>
[C++ Warning] Unit1.cpp(16): W8062 Previous options and warnings not restored
Full parser context
Unit1.cpp(3): #include D:\Leng\C\CppBuilder6\include\Atl\atlvcl.h
[C++ Error] Unit1.cpp(16): E2040 Declaration terminated incorrectly
The fix is trivial. I just added a "*/" in the appropriate place.
I am using CppBuilder6 with SP4 applied. Haven't checked CppBuilder2005
Regards,
Eduardo