forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compiler warning: Where was it?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1214
Location: Morrison, CO, USA

PostPosted: Tue Feb 14, 2023 8:53 pm    Post subject: Compiler warning: Where was it? Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Wed Feb 15, 2023 7:33 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1214
Location: Morrison, CO, USA

PostPosted: Thu Feb 16, 2023 1:52 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Sat Feb 25, 2023 1:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Sun Feb 26, 2023 9:39 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Sun Feb 26, 2023 12:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1884

PostPosted: Sun Feb 26, 2023 2:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group