Skip to content

Conversation

@jketema
Copy link
Contributor

@jketema jketema commented Nov 26, 2025

__has_feature is not available in GCC versions before GCC 14.

Our frontend was exposing __has_feature when emulating earlier versions of GCC. This will be fixed with the latest major frontend update though.

`__has_feature` is not available in GCC versions before GCC 14.

Our frontend was exposing `__has_feature` when emulating earlier versions of
GCC. This will be fixed with the latest major frontend update though.
@github-actions github-actions bot added the C++ label Nov 26, 2025
@jketema jketema marked this pull request as ready for review November 26, 2025 13:07
@jketema jketema requested a review from a team as a code owner November 26, 2025 13:07
Copilot AI review requested due to automatic review settings November 26, 2025 13:07
Copilot finished reviewing on behalf of jketema November 26, 2025 13:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes incorrect test cases that used __has_feature with GCC versions prior to 14, where this feature is not available. The frontend was incorrectly exposing __has_feature when emulating earlier GCC versions, and these tests will no longer be valid once the frontend is updated.

  • Removed test files for GCC 4.2.1 and GCC 4.5.0 that incorrectly used __has_feature
  • Updated expected test output to reflect the removal of these test cases

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
cpp/ql/test/library-tests/attributes/deprecated_with_msg/gcc450.c Removed test file that incorrectly tested __has_feature with GCC 4.5.0
cpp/ql/test/library-tests/attributes/deprecated_with_msg/gcc421.c Removed test file that incorrectly tested __has_feature with GCC 4.2.1
cpp/ql/test/library-tests/attributes/deprecated_with_msg/deprecated_with_msg.expected Updated expected output by removing entries for the deleted GCC test files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@geoffw0
Copy link
Contributor

geoffw0 commented Nov 26, 2025

__has_feature is not available in GCC versions before GCC 14.

Then would it add value to update one of the tests to run on GCC 14? To be honest I'm not exactly sure what these tests are testing.

@jketema
Copy link
Contributor Author

jketema commented Nov 26, 2025

Then would it add value to update one of the tests to run on GCC 14?

That would be the alternative, but the gcc version numbers in the test files made me decide against that.

To be honest I'm not exactly sure what these tests are testing.

I think they're testing whether the feature is available when emulating a certain compiler/version of that compiler. Seems that more in our frontend provider's court any way.

Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

Lets get this merged then.

@jketema jketema merged commit adc13e3 into github:main Nov 26, 2025
18 checks passed
@jketema jketema deleted the feature-incorrect branch November 26, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants