Nice error message "bug"

Wolfgang Bangerth wolf@gaia.iwr.uni-heidelberg.de
Tue May 26 06:54:00 GMT 1998


With regard to Michele Bini writing:
>$ egcs-c++ t.cc
>t.hh: In function `static void t::f()':
>t.hh:10: `PI' undeclared (first use this function)
>t.hh:10: (Each undeclared identifier is reported only once
>t.hh:10: for each function it appears in.)
>
>The error is in t.cc NOT t.hh . Line numbers are ok, though
>...

Let me add that the problem does not lie within the preprocessor. I have
seen this behaviour over and over, but have not been able to extract a
short enough testcase. But when looking at the preprocessor output, I can
see that the file names and lines are ok, so the bug must be in the
compiler.

The problem also happens in gcc2.8.1 and is not only a bug in the error
report code but lies somewhere deeper, since all debug symbols also have
the wrong file name (very annoying if in gdb+emacs the cursors hops into
the .h file instead of the right place if I enter a new function).

Maybe this helps shedding a bit more light to the problem.
Regards
  Wolfgang





More information about the Gcc-bugs mailing list