Conversation
`__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.
There was a problem hiding this comment.
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.
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. |
That would be the alternative, but the gcc version numbers in the test files made me decide against that.
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. |
geoffw0
left a comment
There was a problem hiding this comment.
Lets get this merged then.
__has_featureis not available in GCC versions before GCC 14.Our frontend was exposing
__has_featurewhen emulating earlier versions of GCC. This will be fixed with the latest major frontend update though.