line number of compile error

Hi!

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?

Regards,


Arjan
E-mail: Arjan.van.Dijk@RIVM.nl

It works for me.

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


Which compiler, what is your command line?

Hongyon

It is the pgf90 compiler, not the latest distribution, and the call just:

pgf90 -c myfile.f90

Only next monday I’ll be at the office and have access to the compiler. I’ll give you the version number right then.

Regards,

Arjan

Is it an error or just a warning? For Fortran, if you don’t declare, it is assumed to be real.

Please post an error message you have.

Hongyon

Hi!

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.


Arjan

Hi,

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.

Thank you,
Hongyon