This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/1835
- To: nobody at gcc dot gnu dot org
- Subject: Re: c++/1835
- From: aoliva at gcc dot gnu dot org
- Date: 2 Mar 2001 10:16:01 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: aoliva at gcc dot gnu dot org
The following reply was made to PR c++/1835; it has been noted by GNATS.
From: aoliva@gcc.gnu.org
To: dbaron@fas.harvard.edu, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:
Subject: Re: c++/1835
Date: 2 Mar 2001 10:07:41 -0000
Synopsis: toplevel cv-qualifiers considered in finding best viable function
State-Changed-From-To: open->closed
State-Changed-By: aoliva
State-Changed-When: Fri Mar 2 02:07:41 2001
State-Changed-Why:
Only the top-level cv qualifiers are discarded, since those are the ones that do not affect the type of the function. The const in `const int *' is not discarded, but the const in `int *const' would be.
The function call is ambiguous because `f(void*,int*)' has a better conversion sequence for the second argument, while `f(int *, const int *)' has a better conversion sequence for the first argument. g++ is correct.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1835&database=gcc