As Fortran 2018 C819, a variable with the BIND attribute shall be declared
in the specification part of a module. Add the support for this check.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Your change will still allow BIND(C) variables to be declared in submodules, and I don't think that is allowed.
flang/lib/Semantics/check-declarations.cpp | ||
---|---|---|
107 | Rather than making the name of this function longer (because it does more now), consider making it shorter, like "CheckBindC", since further checks may be added to it in the future. | |
1874 | Consider adding a CHECK() here to ensure that the symbol is BIND(C). Or test for BIND(C) and return if it is not, in which case you can continue to call it unconditionally. The second option seems safer. |
Comment Actions
Address the comments:
- Rename to CheckBindC.
- Call it unconditionally and return if it does not have BIND(C) attr.
Rather than making the name of this function longer (because it does more now), consider making it shorter, like "CheckBindC", since further checks may be added to it in the future.