gcc-3.x gives this information but gcc-4.2 does not. In the shell snippit below, the unknown symbol name should be embedded in the gcc-4.2 error lines as it is done in gcc-3.4.
$ gcc-3.4 foo.f undeclared_variable(index)=0.0 ^ Invalid declaration of ... 'undeclared_variable' at (^) ... $ gcc-4.2 foo.f undeclared_variable(index)=0.0 1 Error: Unexpected STATEMENT FUNCTION statement at (1) another_variable(1)=0.0 1 Error: Unclassifiable statement at (1) -- Summary: Unknown symbol name should be included in Error message Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: harry dot rockefeller at gmail dot com GCC host triplet: 2.6.22-14-generic kernel GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34802