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] Commented: (STDCXX-743) [HP aCC 3.77] bogus error #440 on valid code
Date Mon, 10 Mar 2008 19:30:46 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577132#action_12577132
] 

Martin Sebor commented on STDCXX-743:
-------------------------------------

HP says "??this works fine with A.03.80 with the option [+hpxstd98|http://docs.hp.com/en/11920/HP%20aC++%20Online%20Programmer's%20Guide/options.htm#opt+hpxstd98].??"
I've confirmed that aCC 3.77 also accepts the option and successfully compiles the code.

We might want to consider using the option.

> [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