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

Avoid relying on non-standard Fortran syntax extension for unary negation #106

Merged
merged 1 commit into from
May 22, 2024

Conversation

PhilMiller
Copy link
Contributor

The code as written leads gfortran to produce this warning:

Warning: Extension: Unary operator following arithmetic operator (use parentheses)

…tion

The code as written leads gfortran to produce this warning:

> Warning: Extension: Unary operator following arithmetic operator (use parentheses)
@PhilMiller
Copy link
Contributor Author

Many of the cases touched in my change could maybe be more clearly rewritten by replacing addition with subtraction, or reciprocal by exponentiation with division. I opted to take a purely syntactic approach. I'll defer to the Noah developers on how they'd like arithmetic to be written out in the code.

Copy link
Contributor

@GreyREvenson GreyREvenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Tested with -Wall.

@GreyREvenson GreyREvenson merged commit 5be0faa into NOAA-OWP:main May 22, 2024
4 checks passed
@PhilMiller PhilMiller deleted the PhilMiller/negation branch May 23, 2024 16:55
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

Successfully merging this pull request may close these issues.

2 participants