My editor parses the errors of the compiler and jumps to the
location of the first error. When I have misstyped a variable name,
the compiler (as it should!) complains that this variable has never been declared. Unfortunately, no linenumber is given, so my macro has
troubles locating the faulty source line.
How can I tell the compiler that I want a linenumber for every error that is clearly related to a fixed line?
myprompt% pgcc c.c
PGC-W-0156-Type not specified, ‘int’ assumed (c.c: 1)
PGC-S-0039-Use of undeclared variable d (c.c: 3)
PGC-S-0039-Use of undeclared variable d (c.c: 3)
PGC/x86-64 Linux Rel Dev-r53886: compilation completed with severe errors
Here is my error message (libxmath.f90 is my sourcefile with just 1 deliberately placed typo in a variable name, function basecumulativephi is the function with the typo):
PGF90-S-0038-Symbol, tdum, has not been explicitly declared (libxmath.f90)
0 inform, 0 warnings, 1 severes, 0 fatal for basecumulativephi
I used IMPLICIT NONE to enforce declaration checking.
As you see, there is no linenumber in the error message.
Even though it does not explicitly tell the line number but it does tell which function , “basecumulativephi”, the variable is not declared. We think it has sufficient information for user where to look.
Is there a way you can work around your macro with function name?
However, I will pass on your request to our engineer department if they will consider to add line number in the future.