Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLOCK DATA and subsequent definitions error #470

Open
prsja opened this issue Mar 10, 2025 · 2 comments
Open

BLOCK DATA and subsequent definitions error #470

prsja opened this issue Mar 10, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@prsja
Copy link

prsja commented Mar 10, 2025

I have a working code in Fortran 90 that I compile using Silverfrost FTN95 compiler. Code has been in use since 90's and compiler is not resulting in any errors or warnings. However, while using fortls in my VS code I stumble upon this 'Unexpected end of scope at line x' error and then all subsequent subroutines show an error 'Subroutine/Function definition before CONTAINS statement'.

I know that deleting the 'BLOCK DATA' definition will solve this issue entirely. Also, moving this definition to the very end also solves the problem, so it seems that for some reason it affects subsequent methods/functions. However, I am not allowed to modify the code, so both of these solutions are not an option for me.

Is there maybe a setting that I have missed that will help me with this or is this something fortls developer could look at?

Please see attached pictures. First picture shows error at line 2, and the other one shows error at line 10.

best regards,
prs

Image
Image

@prsja prsja added the enhancement New feature or request label Mar 10, 2025
@gnikit
Copy link
Member

gnikit commented Mar 14, 2025

Maybe the option --disable-diagnostics works, not sure docs

@prsja
Copy link
Author

prsja commented Mar 14, 2025

Hi,

I perhaps should have mentioned the most important problem that this is causing. All the subroutines that are considered faulty will not be subject to 'peek definition' and will not be listed on the references list. So these very nice features of VS code will not be supported. Thanks for the hint, I gave it a shot, it did remove squiggly lines, so it worked in that sense, but unfortunately the problem persists and looking up definitions is not possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants