Skip to content

Conversation

@Stylie777
Copy link
Contributor

There has been a number of deprecation warnings that have been added to Flang, however these features are only deprecated when the OpenMP Version being used is 5.2 or later. Previously, flang did not consider the version with the warnings so would always be emitted.

Flang now ensures warnings are emitted for the appropriate version of OpenMP, and tests are updated to reflect this change.

Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

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

Maybe IssueNonConformanceWarning should have an argument specifying the minimum version to warn on? That way this can not be forgotten in the future

@Stylie777
Copy link
Contributor Author

Thanks for the suggestion @tblah, I had avoided doing the version check inside the function to avoid a potentially needed function call, but this approach would be more robust so I will rework the implementation to do this.

Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

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

LGTM with nits fixed. Previous discussion was here: #142378 (review)

Edit: see failing test - this does look relevant.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
parser::CharBlock source, unsigned emit_from_version);
parser::CharBlock source, unsigned emitFromVersion);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
parser::CharBlock source, unsigned emit_from_version) {
parser::CharBlock source, unsigned emitFromVersion) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

There has been a number of deprecation warnings that have been
added to Flang, however these features are only deprecated when
the OpenMP Version being used is 5.2 or later. Previously, flang
did not consider the version with the warnings so would always be
emitted.

Flang now ensures warnings are emitted for the appropriate
version of OpenMP, and tests are updated to reflect this change.
@Stylie777 Stylie777 force-pushed the deprecation_warnings_omp_5_2 branch from 23ab4b3 to 2846d90 Compare June 17, 2025 10:33
@Stylie777
Copy link
Contributor Author

The test failure is related yes, new test that was added while I was away so this has been updated.

@Stylie777 Stylie777 merged commit 671caef into llvm:main Jun 18, 2025
7 checks passed
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