This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33801] New: Missing warning
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Oct 2007 17:36:55 -0000
- Subject: [Bug c++/33801] New: Missing warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For this kind of code:
struct cont
{
typedef const int& const_reference;
};
template<typename C>
struct iter
{
void
f(const typename C::const_reference value)
{ }
};
int main()
{
iter<cont> it;
it.f(5);
}
we do not emit any warning for the 'const' in the signature of f. We simply
ignore it. The EDG front-end does.
--
Summary: Missing warning
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pcarlini at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33801