View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1225 Location: Morrison, CO, USA
|
Posted: Tue Feb 14, 2023 8:53 pm Post subject: Compiler warning: Where was it? |
|
|
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.
Quote: |
[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]
0098) 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. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Wed Feb 15, 2023 7:33 am Post subject: |
|
|
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. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1225 Location: Morrison, CO, USA
|
Posted: Thu Feb 16, 2023 1:52 am Post subject: |
|
|
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 |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Sat Feb 25, 2023 1:16 pm Post subject: |
|
|
Would it help if Plato's line numbers also counted any INCLUDE file lines, with an optional display of what they contain?
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Sun Feb 26, 2023 9:39 am Post subject: |
|
|
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. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Sun Feb 26, 2023 12:05 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1896
|
Posted: Sun Feb 26, 2023 2:22 pm Post subject: |
|
|
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 . |
|
Back to top |
|
|
|