public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4459: g++ 3.0.1 resolves to wrong const overload when using access adjustment
@ 2002-02-26 13:57 nathan
0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-02-26 13:57 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, sebor, yoder
Synopsis: g++ 3.0.1 resolves to wrong const overload when using access adjustment
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Tue Feb 26 13:54:55 2002
State-Changed-Why:
This appears fixed on current CVS, so 3.1 will be ok
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4459
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/4459: g++ 3.0.1 resolves to wrong const overload when using access adjustment
@ 2001-10-03 11:46 Martin Sebor
0 siblings, 0 replies; 3+ messages in thread
From: Martin Sebor @ 2001-10-03 11:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/4459; it has been noted by GNATS.
From: Martin Sebor <sebor@roguewave.com>
To: yoder@roguewave.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/4459: g++ 3.0.1 resolves to wrong const overload when using
access adjustment
Date: Wed, 03 Oct 2001 12:51:31 -0600
yoder@roguewave.com wrote:
>
> >Number: 4459
> >Category: c++
> >Synopsis: g++ 3.0.1 resolves to wrong const overload when using access adjustment
This looks related (or maybe even the same as)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1771
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
* c++/4459: g++ 3.0.1 resolves to wrong const overload when using access adjustment
@ 2001-10-03 11:36 yoder
0 siblings, 0 replies; 3+ messages in thread
From: yoder @ 2001-10-03 11:36 UTC (permalink / raw)
To: gcc-gnats; +Cc: sebor
>Number: 4459
>Category: c++
>Synopsis: g++ 3.0.1 resolves to wrong const overload when using access adjustment
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 03 11:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: yoder@roguewave.com
>Release: 3.0.1
>Organization:
>Environment:
g++ 3.0.1 on Solaris 8
>Description:
When access adjustment is used in the body of a class for member functions that are overload on const, all calls resolve (incorrectly) to the const overload.
>How-To-Repeat:
Here is a short test case:
#include <iostream>
using namespace std;
struct A {
void foo() { cout << "non const" << endl; }
void foo() const { cout << "const" << endl; }
};
struct B : private A {
using A::foo;
};
int main() {
B b;
b.foo();
return 0;
}
output:
const
Following is the g++ compile line with the verbose and save temps option:
$ g++ -v -save-temps -c access_adj.cpp
Reading specs from /package/1/compilers/g++/3.0.1/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/specs
Configured with: ../gcc-3.0.1/configure --prefix=/tmp/gcc --enable-threads
Thread model: posix
gcc version 3.0.1
/package/1/compilers/g++/3.0.1/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/cpp0 -lang-c++ -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -iprefix /package/1/compilers/g++/3.0.1/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/ -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=1 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc access_adj.cpp access_adj.ii
GNU CPP version 3.0.1 (cpplib) (sparc)
ignoring nonexistent directory "/package/1/compilers/g++/3.0.1/sparc-sun-solaris2.8/include"
ignoring nonexistent directory "/tmp/gcc/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/../../../../include/g++-v3"
ignoring nonexistent directory "/tmp/gcc/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/../../../../include/g++-v3/sparc-sun-solaris2.8"
ignoring nonexistent directory "/tmp/gcc/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/../../../../include/g++-v3/backward"
ignoring nonexistent directory "/tmp/gcc/include"
ignoring nonexistent directory "/tmp/gcc/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/include"
ignoring nonexistent directory "/tmp/gcc/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/../../../../sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
/package/1/compilers/g++/3.0.1/include/g++-v3
/package/1/compilers/g++/3.0.1/include/g++-v3/sparc-sun-solaris2.8
/package/1/compilers/g++/3.0.1/include/g++-v3/backward
/package/1/compilers/g++/3.0.1/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/include
/usr/include
End of search list.
/package/1/compilers/g++/3.0.1/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/cc1plus -fpreprocessed access_adj.ii -quiet -dumpbase access_adj.cpp -version -o access_adj.s
GNU CPP version 3.0.1 (cpplib) (sparc)
GNU C++ version 3.0.1 (sparc-sun-solaris2.8)
compiled by GNU C version 2.95.2 19991024 (release).
/usr/ccs/bin/as -V -Qy -s -o access_adj.o access_adj.s
/usr/ccs/bin/as: Sun WorkShop 6 99/08/18
$ g++ -o access_adj access_adj.o
$ access_adj
const
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-26 21:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-26 13:57 c++/4459: g++ 3.0.1 resolves to wrong const overload when using access adjustment nathan
-- strict thread matches above, loose matches on Subject: below --
2001-10-03 11:46 Martin Sebor
2001-10-03 11:36 yoder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).