| Title: | C++ |
| Notice: | Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS) |
| Moderator: | DECCXX::AMARTIN |
| Created: | Fri Nov 06 1987 |
| Last Modified: | Thu Jun 05 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 3604 |
| Total number of notes: | 18242 |
/*
Problem report: The following code cannot be compiled
Compilation command:
cxx -V -c -o A.o A.cxx
cxx (cxx)
DEC C++ V5.5-004 on Digital UNIX (Alpha)
Internal compiler error detected at line 7071 in file
/usr/proj/decc2/v55_cxx/src/cxxfe/cxsymtab.c.
cxx: Fatal: A memory access violation (bus error or segmentation fault)
has occurred. Please submit a problem report.
Compiler:
DEC C++ V5.5-004 on Digital UNIX (Alpha)
OS:
Digital UNIX V4.0A (Rev. 464)
HW:
DEC 3000
*/
class A
{
public:
A() {}
class B
{
public:
#if 0
B() {}
#else
B();
#endif
};
};
#if 1
A::B() {}
#endif
// changing the 1st #if to #if 1 and the 2nd to #if 0 allows
compilation
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 3595.1 | compiler should not core dump, it should give a compilation error | DECC::J_WARD | Mon Jun 02 1997 09:53 | 18 | |
A::B() is incorrect as the declaration of the B constructor...
A::B::B() is correct.
The compiler should properly diagnose this (:
This is what our development 6.0 compiler says:
"t.cxx", line 19: error: expected an identifier
A::B() {}
^
"t.cxx", line 19: error: expected a ";"
A::B() {}
^
| |||||