Silverfrost Forums

Welcome to our forums

Compiler warning: Where was it?

14 Feb 2023 7:53 #29946

I had the following warning but the text of the message left me confused. The file does not have 440 lines. So, the warning line number is probably matching to one of the many INCLUDE files this main file contained.

[FTN95/Win32 Ver. 8.95.0 Copyright (c) Silverfrost Ltd 1993-2022] Licensed to: William Horger Organisation: CJD Software

NO ERRORS  [<CMAIN_CMASTER_DO_ME_FIRST> FTN95 v8.95.0]
  1.     logical:: copy_config_to_inifile
    

WARNING - 520: COPY_CONFIG_TO_INIFILE has been declared more than once with the same type (see line 440) NO ERRORS, 1 WARNING [<CMASTER_DO_ME_FIRST> FTN95 v8.95.0] NO ERRORS [<BUTTON_REFRESH> FTN95 v8.95.0]

Is it possible to reference the INCLUDE'd file in warnings/errors? It happens for some, but not others.

15 Feb 2023 6:33 #29948

The compiler copies the included files into the source code and then processes the whole as one entity. Any declarations that appear in the source and in the an included file will be read twice by the compiler.

Normally the compiler will tell you which included file is at fault but apparently not in this context.

16 Feb 2023 12:52 #29949

Paul, thanks for this.

Yes, I have found it true that (generally) the trail leads in the desired direction. I'll deal with it. It is rare now to get the warning.

Bill

25 Feb 2023 12:16 #29960

Would it help if Plato's line numbers also counted any INCLUDE file lines, with an optional display of what they contain?

Eddie

26 Feb 2023 8:39 #29961

Eddie

That's an interesting thought. At the moment, if you double click on the error report then the INCLUDEd file will open and 'go to' the offending line.

26 Feb 2023 11:05 #29962

Hi Paul,

That's a good answer to the first line of Bill's question, and was something I didn't know before.

On the subject of GOTOs, I entertained a Japanese visitor last week whose surname was GOTO! Despite Dijkstra's overlong rant all those years ago, GOTO was not harmful at all, but was a perfect gentleman!

Eddie

26 Feb 2023 1:22 #29963

Dr. Kazushige Goto did some brilliant work in developing the GotoBlas many years ago. The current OpenBlas library is a derivative of it. He used to complain that there was a time when people were always trying to eliminate him in their programs.

See https://en.wikipedia.org/wiki/GotoBLAS .

Please login to reply.