[an error occurred while processing this directive]

HP OpenVMS Systems

ask the wizard
Content starts here

Reporting a C++ Bug?

» close window

The Question is:

 
C Plus Plus on Alpha VMS 7.2 -
 
Within Switch/Case labels, each of which is self-contained within begin-end
 braces "{  }", declaring the same named char* seems to  confuse the compiler
 at RUN-TIME.  The code compiles and links without problems.   I discovered
 this while debugging.  Any
ideas?  This does NOT happen under Alpha VMS V6.2-1H3.
 
My "tmp" variable should be getting filled with the return from strstr, but it
 does NOT.  The value in R0 is correct, however, as I step through the debugger.
Note:  my use of "tmp" as a char* is scattered througout this method, but I
 expected the use of braces within the SWITCH/CASE block to protect it and keep
 it unique during its scope life.
 
Example:
 
switch (blah)
 
case 1:
   {
     char* tmp=strstr(mybuf, "/abc");
     ... more code...
   }
 
case 2:
 
   {
     char* tmp=strstr(mybuf, "/xyz");
     ... more code...
   }
 
 
 
 
 
 
 


The Answer is :

 
  Please contact the Compaq Customer Support Center, as the Compaq C++
  compiler version(s) and a reproducer will be required.

answer written or last revised on ( 7-MAY-2001 )

» close window