home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!world!btarbox
- From: btarbox@world.std.com (Brian J Tarbox)
- Subject: compiler error reporting
- Message-ID: <BzFq6w.MHB@world.std.com>
- Organization: The World Public Access UNIX, Brookline, MA
- Date: Fri, 18 Dec 1992 03:11:19 GMT
- Lines: 26
-
- Why are c++ compilers so bad about reporting errors?
- Long ago most c compilers would unhelpfully say only
- "syntax error" to most errors. They have progressed
- to now giving very help error messages. Most c++
- compilers (especially on workstations) still give
- terrible errors.
-
- For example, in a class I had the following private
- variable declared: "Process process" i.e. 'process'
- is a 'Process'. I accidentally passed 'Process' to
- a routine and got 30 errors, none of which where
- within 10 lines of the incorrect line.
-
- Second example. I forward declare a class and then
- try to call one of its public functions. I get a
- 'no matching signature for member function bla' error.
- Having written a few compilers I KNOW the compiler knows
- it hasn't seen the real class definition, and it also
- KNOWS (in the previous example) that a class name is not
- allowed as a parameter. While the latest esoteric features
- are nice, I'd sure like to see the 'feature' of decent
- error reporting.
-
- Brian Tarbox
- Been There - Done That Software
-
-