[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
g++ unqualified-id error gives wrong line
From: |
Boyd Montgomery |
Subject: |
g++ unqualified-id error gives wrong line |
Date: |
Thu, 12 Feb 2009 14:02:20 -0800 |
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 };
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- g++ unqualified-id error gives wrong line,
Boyd Montgomery <=