This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: New parser
- From: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Dec 2002 21:04:21 +0100 (CET)
- Subject: Re: C++ PATCH: New parser
- References: <52420000.1041270610@warlock.codesourcery.com>
Mark,
is there any chance we can get better diagnosis for code like the
following?
% cat x.cc
#include <vector>
using namespace std;
template <class T>
class TCONJUNCTION
{
typedef int const_iterator;
public:
void get()
{
unsigned next_var = 0;
for( TCONJUNCTION<T>::const_iterator i = 1; // line 14
i != 10;
i++ )
{ }
}
};
% gccvs x.cc
x.cc: In member function `void TCONJUNCTION<T>::get()':
x.cc:14: error: expected `;'
This is a case where the old parser did not require typename, and
the error message is quite confusing for the casual C++ hacker.
Gerald