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

Get rid of special cases to enable more compiler warnings #9

Open
sloede opened this issue Jun 8, 2021 · 0 comments
Open

Get rid of special cases to enable more compiler warnings #9

sloede opened this issue Jun 8, 2021 · 0 comments

Comments

@sloede
Copy link
Member

sloede commented Jun 8, 2021

A good summary with good points.

  1. There is a set of FP comparisons in HOHQMesh that can be eliminated, and I am doing that now on a local branch. But we will have to keep the others in here unless someone comes up with a "safe" way to do floating point comparisons without having to compare to 0.0 at some point. It is also part of the API for FTValue that will convert an FP number to logical depending on if the argument is 0 or not zero. (I guess that could be fixed with a cast to integer.)
  2. I have used the no-op kind of trick in a few places. (e.g. IF(self % refCount() >= 0) CONTINUE )
    But since the code has been written over the course of a decade, features have been added, but not necessarily retroactively. The whole issue is a quirk of the fortran language which requires explicit passing of the this/self object even if it is not used.
  3. I used count because that's what is used elsewhere (other languages/frameworks) for counting the number of objects in a collection, and is shorter than "numberOfObjects", but it is easy to find and could be changed. I'll look into that.
  4. It is interesting that implicit procedures are now considered something to warn about, since has been an integral part of the language since the 1950's. Depending on dependency ordering, the fix is pretty easy simply by putting those routines in a module. The advantage of implicit interfaces is lack of dependencies, making compilation easier. The disadvantage is there is no checks on arguments. The makefiles would have to be modified for the new dependencies. HOHQMesh has a lot of files with implicit interfaces.

Originally posted by @DavidAKopriva in #8 (comment)

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

No branches or pull requests

1 participant