Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
$ uname -sr && aCC -V
HP-UX B.11.31
aCC: HP ANSI C++ B3910B A.03.77
-
Incorrect Behavior
Description
The code below distilled from a test case submitted in this post fails to compile with HP aCC 3.77 and prior versions but compiles successfully with gcc 4.1.2 and EDG eccp 3.9.
$ cat t.cpp && aCC -V -c t.cpp template <class T> struct B0 { }; template <class T> struct B1: B0<T> { }; template <class T> struct D: B1<T> { }; template <class T> struct X { T* p; X () { } template <class U> X (const X<U> &p) : p (p.p) { } }; X<volatile D<int> > x0; X<volatile B1<int> > x1 (x0); aCC: HP ANSI C++ B3910B A.03.77 Error 440: "t.cpp", line 8 # Cannot initialize 'volatile B1<int> *' with 'volatile D<int> *const'. template <class U> X (const X<U> &p) : p (p.p) { } ^^^ Error 445: "t.cpp", line 1 # Cannot recover from earlier errors. template <class T> struct B0 { }; ^^^^^^^^^^^^^^^^^^^^^^^^^^
Attachments
Issue Links
- is depended upon by
-
STDCXX-615 [HP aCC 3.73] error #440 in 2.smartptr.shared.cpp
- Resolved