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++/30982] New: Junk in diagnostic message


Maybe this is a known issue, but I just noticed that many meaningless words are
output for this wrong snippet:

class base
{
public:
  typedef int vvv;
};

template<typename T>
  class derived : public base
  { };

template<typename T>
  void
  f(const derived<T>&)
  {
    typedef typename derived<T>::base base;
    /* typename */ base::vvv uuu;
  }

int main()
{
  derived<float> dd;
  f(dd);
}

paolo:~/Work> g++ reduced.cc
reduced.cc: In function 'void f(const derived<T>&)':
reduced.cc:16: error: expected `;' before 'uuu'
reduced.cc: In function 'void f(const derived<T>&) [with T = float]':
reduced.cc:22:   instantiated from here
reduced.cc:16: error: dependent-name 'derived::#'typename_type' not supported
by pp_cxx_unqualified_id#::vvv' is parsed as a non-type, but instantiation
yields a type
reduced.cc:16: note: say 'typename derived::#'typename_type' not supported by
pp_cxx_unqualified_id#::vvv' if a type is meant


-- 
           Summary: Junk in diagnostic message
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          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=30982


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