T.R | Title | User | Personal Name | Date | Lines |
---|
3430.1 | Found out late in the game | HNDYMN::MCCARTHY | A Quinn Martin Production | Wed Feb 05 1997 07:08 | 32 |
| Elin,
Your description of what the compiler does is correct. It was not
until very close to the SSB release of 5.5 on OpenVMS Alpha was this 'issue'
brought up.
I think it all started because the C++ compiler initially did not define
__VMS_VER so header files could not be fixed for all platforms. So when
the problem you reported was fixed in our "mainline" code, it was not fixed
in the right version that gets installed on pre 7.0 systems.
There is some goodness to this however. Because, at times, fixes are made
in header files that also releate to fixes in run time (such as a new
entry point into cxxl$011_shr - yuck!) this can not be determined only by
OS version at compile time.
A good example is some work we did with __int64. If the header file
with this function 'enabled' were installed on a pre 7.1 system (maybe 7.0, I'd
have to check), a compile would succeed but a link would fail to find the run
time behind the calls. If we ever release a TIMA kit with that support in it,
then a new header file would have to be included, again - yuck.
I'm going to try to get some of this straightened out so header-file only
bug fixes get released on all platforms.
As for the fix for this problem, as hinted to above, using the lastest header
files may cause some link time failures and I will have to double check
to see if the const issue was a header-file only fix.
Sorry for the confusion.
Brian J.
|
3430.2 | needs runtime | HNDYMN::MCCARTHY | A Quinn Martin Production | Wed Feb 05 1997 10:20 | 27 |
| The fix for this specific problem is in the runtime and available with V7.0.
It is not planned to be put in any TIMA kit. Even if it was, the header file
would have to be updated, something a TIMA kit (any platform) has never
done.
So to answer all your questions:
>>Is this expected?
With this fix, yes.
>> Is his solution to use the string.hxx from the default CXXL$DEF_HXX.tlb?
No. The new routine to fix the problem described is not available until
OpenVMS V7.0 (I still need to verify that its 7.0 and not 7.1).
>>Or will this cause other problems??
See .1 for problems that will cause.
>>What is the right thing to do for him (without having to upgrade to
>>OpenVMS 7.0)?
Upgrade to OpenVMS V7.1 ? :-)
Brian J.
|
3430.3 | Thanks... a workaround? | CSC32::E_VAETH | Suffering from temporary brain cramp, stay tuned | Wed Feb 05 1997 11:11 | 14 |
| Thanks for the info so far. If the string.hxx he needs is not available until
7.0/7.1, what can be done to make the following compile??
#include <string.hxx>
void test(const String &foo)
{
String bar=foo(0,5);
}
Thanks,
Elin
|
3430.4 | call non-const version of operator() | DECC::J_WARD | | Wed Feb 05 1997 11:36 | 16 |
| // I can think of three different workarounds
#include "String.hxx"
// 1. make this argument non-const
void test(const String& foo)
{
//String bar= foo(0,5);
// 2. OR change the above to cast foo to non-const
//String bar= ((String &) foo)(0,5);
// 3. OR create a temporary (non-const) String
String tmpfoo = foo;
String bar = tmpfoo(0,5);
}
|
3430.5 | Thanks ! | CSC32::E_VAETH | Suffering from temporary brain cramp, stay tuned | Wed Feb 05 1997 12:46 | 0
|