-
Notifications
You must be signed in to change notification settings - Fork 102
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
Support disabling of implicit typing in package manifest #577
Comments
As mentioned in the linked PR, I'd like to give this a try, if you agree. If you do, any pointers are welcome. |
Alright, here is a brief outline of a strategy to implement this feature. All references are based on the patch from #575. To implement this feature we need to represent it in the package manifest, this happens in the derived types defined in fpm/src/fpm/manifest/build.f90 Lines 22 to 23 in beaf9a8
The next step is to get the information into the fpm model, since this is a package resolved option, it shouldn't go into the top-level, but should be included in the Lines 96 to 105 in beaf9a8
The Lines 159 to 160 in beaf9a8
Once you have the information about the implicit typing in the model, it must be made accessible in the target generation ( Line 195 in beaf9a8
Eventually, the correct flag should be added to the The remaining issue is to get the correct command line argument for enabling this option, the model has a compiler object which can be adjusted to provide the correct argument: Lines 72 to 81 in beaf9a8
|
Wow, thank you so much Sebastian @awvwgk ! |
You're welcome. |
I've updated the table of options with more compilers (see original issue post). Here are the sources for each of them: @certik, do you have a flag for LFortran already? |
It's the default in |
I guess this issue has gone stale for some time now. @epagone I cleared your assignment to encourage others to pick it up. |
I made a quick and hacky proof-of-concept implementation in 25f6553, which works with GFortran. Needs some more thoughts and polishing before this can become a pull request. |
Motivation
Allow packages to opt-out from default implicit typing in Fortran. This allows to get the full befits of
implicit none
in every scope without having to remember typing it.More difficult is whether we can find options in every compiler to actually guarantee that this is working.
Specification
The build table seems most appropriate for this option:
Prior Art
Compiler flags:
-fimplicit-none
-Mdclchk
-u
-eI
/IMPLICIT_NONE
/warn:declarations,errors
-warn declarations,errors
-fimplicit-none-type-always
-qundef
or-u
Additional Information
Related issue #359
Draft PR: #506
The text was updated successfully, but these errors were encountered: