This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/33801] New: Missing warning


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]