stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-743) [HP aCC 3.77] bogus error #440 on valid code
Date Sun, 09 Mar 2008 23:17:46 GMT
[HP aCC 3.77] bogus error #440 on valid code
--------------------------------------------

                 Key: STDCXX-743
                 URL: https://issues.apache.org/jira/browse/STDCXX-743
             Project: C++ Standard Library
          Issue Type: Bug
          Components: External
         Environment: $ uname -sr && aCC -V
HP-UX B.11.31
aCC: HP ANSI C++ B3910B A.03.77

            Reporter: Martin Sebor


The code below distilled from a test case submitted in this [post|http://www.nabble.com/STDCXX-615-to15886174.html]
fails to compile with HP aCC 3.77 and prior versions but compiles successfully with gcc 4.1.2
and EDG eccp 3.9.

{noformat}
$ 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 { };
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
{noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message