This is the mail archive of the gcc@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]

new parser problems - or just my code...


Hi,

Thought I would give the new parser a whirl on some source code of mine.
It died with internal compiler error first file :)
(full bootstrap of todays mainline cvs)

c++die9.cc is a reduced testcase of the internal compiler error.
Explicitly putting std:: infront of fgets makes it go away. This compiles fine on g++-3.2.

Also causing significant spamage in my compile (having put std:: in for the above) - is a stack of new warnings.
c++warning.cc - compiles cleanly on g++-3.2 - but with mainline gives
c++warning.cc:8: warning: lookup of `iterator' finds `template<class _Category, class _Tp, class _Distance = ptrdiff_t, class _Pointer = _Tp*, class
_Reference = _Tp&> struct std::iterator'
c++warning.cc:8: warning: instead of `new_list<T, Alloc>::iterator' from
dependent base class
c++warning.cc:8: warning: (use `typename new_list::iterator' if that's what
you meant)
c++warning.cc:8: warning: lookup of `iterator' finds `template<class _Category, class _Tp, class _Distance = ptrdiff_t, class _Pointer = _Tp*, class
_Reference = _Tp&> struct std::iterator'
c++warning.cc:8: warning: instead of `new_list<T, Alloc>::iterator' from
dependent base class
c++warning.cc:8: warning: (use `typename new_list::iterator' if that's what
you meant)

what i'm trying to do is typedef new_list<T. Alloc>::iterator to be of type list<T, Alloc>::iterator
Even if my code is wrong - giving a duplicate warning doesnt seem right.

Also While minimising the testcases I discovered that the error message for doing, things like std::vector<std::vector<int>> - is now much worse compared to the simple 'use > > rather then >>' that was given before.

I have another internal compiler error just pop up now - but i suspect this one might take a while to minimise.

Gareth

_________________________________________________________________
The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup
#include <list>

using namespace std;

template <class T, class Alloc> 
class new_list : public list<T, Alloc> { 
public:
    typedef typename list<T, Alloc>::iterator iterator;
};

#include <cstdio>

using namespace std;

template <class T>
void generate() {
    char buf[20000];
    fgets(buf, sizeof(buf), NULL);
}




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