Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

g++ unqualified-id error gives wrong line

14 views
Skip to first unread message

Boyd Montgomery

unread,
Feb 12, 2009, 5:02:20 PM2/12/09
to bug...@gnu.org
Compile the following code, which is missing a semi-colon on the last line:


class WrongLine {
WrongLine() {
}
private:
int n;
}


In g++ 4.0.3 (Ubuntu 4.0.3-1ubuntu5), the above yields:
GBug.h:3: error: expected unqualified-id at end of input

But its actually line 6 where the error occurs, which can be fixed by
changing line 6 to };


0 new messages