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]

c++/2761: template<class c> A: public Container<c> { iterator a; } gives a syntax error with -pedantic/compiles without it



>Number:         2761
>Category:       c++
>Synopsis:       template<class c> A: public Container<c> { iterator a; } gives a syntax error with -pedantic/compiles without it
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon May 07 08:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Regis Lachaume
>Release:        last night snapshot (May, the 7th)
>Organization:
>Environment:
linux i386
>Description:
In a template class publicly derivated from a container 
that has  one of the template parameters as basetype, 
iterator and const_iterator give a syntax error when
gcc compiles with -pedantic + any option and compile well
whithout that option. Example

  #include <vector>

  template<class vt> 
  class B: public std::vector<vt> { iterator a; };
  
  int main() { }
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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