This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16175] [3.3/3.4/3.5 regression] Wrong type reported in diagnostic
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2004 16:27:11 -0000
- Subject: [Bug c++/16175] [3.3/3.4/3.5 regression] Wrong type reported in diagnostic
- References: <20040624153539.16175.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-06-25 16:27 -------
Confirmed. This is indeed confusing:
---------------------
template <typename> struct Template {};
template<template<typename> class D>
struct B {
static void foo(const D<void> *);
};
class D : protected B<Template> {};
void bar() {
D::foo (0);
}
---------------------------
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -w -c x.cc
x.cc: In function `void bar()':
x.cc:5: error: `static void B<D>::foo(D<void>*) [with D = Template]' is
inaccessible
x.cc:11: error: within this context
Note that it refers to the argument of foo as a non-const pointer, even
though it really is a const pointer.
This is a regression over 2.95, which printed
g/x> /home/bangerth/bin/gcc-2*/bin/c++ -w -c x.cc
x.cc: In function `void bar()':
x.cc:5: `static void B<Template>::foo(const Template<void> *)' is inaccessible
x.cc:11: within this context
W.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Known to fail| |3.2.3 3.3.3 3.4.0 3.5.0
Known to work| |2.95.3
Last reconfirmed|0000-00-00 00:00:00 |2004-06-25 16:27:09
date| |
Summary|Wrong type reported in |[3.3/3.4/3.5 regression]
|diagnostic |Wrong type reported in
| |diagnostic
Target Milestone|--- |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16175