C++ and useful error messages
pmscott
pmscott@signal.dera.gov.uk
Thu Dec 21 04:03:00 GMT 2000
On Wednesday, December 20, 2000 8:59 PM, Joe Buck
[SMTP:jbuck@racerx.synopsys.com] wrote:
>
> emsg2.C: In function `int foo()':
> emsg2.C:2: `vector' undeclared (first use this function)
> emsg2.C:2: (Each undeclared identifier is reported only once for each
> function
> it appears in.)
> emsg2.C:2: Perhaps you meant to use `std::vector' ?
> emsg2.C:2: parse error before `>' token
>
Much better: any chance of losing the wordy reported only once... bit?
How about changing:
emsg2.C:2: `vector' undeclared (first use this function)
emsg2.C:2: (Each undeclared identifier is reported only once for each
function it appears in.)
to:
emsg2.C:2: `vector' undeclared (will not report it again for this
function)
The single line error will also be less of a pain in editors which
parse the errors for you.
Thanks,
Paul Scott
More information about the Gcc
mailing list