-
Notifications
You must be signed in to change notification settings - Fork 19
Checked Qualifier Support #1198
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
Conversation
|
||
// type-qualifiers | ||
unsigned TypeQualifiers : 5; // Bitwise OR of TQ. | ||
unsigned TypeQualifiers : 8; // Bitwise OR of TQ. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanation:
TypeQualifiers are defined under DeclSpec (First phase of parsing qualifiers) and QualType (2nd phase)
I have expanded TQ under DeclSpec but NOT under QualType as doing the second was rabbit hole and required major changes, due to its interweaving with 3-Bit FastMask (expanding this in size is extremely complex)
# Conflicts: # .github/workflows/checkedc-clang-macro-sanity.yml
# Conflicts: # .github/workflows/checkedc-clang-macro-sanity.yml
# Conflicts: # .github/workflows/checkedc-clang-macro-sanity.yml
# Conflicts: # .github/workflows/check-clang-windows.yml # .github/workflows/check-clang.yml
# Conflicts: # .github/workflows/check-clang-windows.yml # .github/workflows/check-clang.yml
@arunkumarbhattar Is this subsumed.by PR #1199? It looks it is. If so, we should close this PR. |
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Commits](isaacs/minimatch@v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Title: Add Test Suite for Backward Compatibility Syntax and Macros
Description: This PR adds a comprehensive test suite to verify the correct implementation of the alternate syntax and macros introduced for enhancing backward compatibility of Checked C code with non-Checked C compilers, as proposed in this wiki page. The test suite covers the following key aspects:
Pointer types: Test cases to validate the proper functioning of _Array, _Nt_array, and _Single qualifiers for pointer types.
Arrays: Verify that the _Checked keyword behaves as expected when a compiler does not support Checked C.
Generic types: Validate the correct functioning of the _TyArg and _TyVar macros, as well as the two-part approach for generic function definitions and generic struct definitions.
Bounds annotations: Validate the new keywords _Any, _Bounds, _Byte_count, and _Count for bounds expressions, and test cases for declarators followed by bounds expressions.
Dynamic check expressions: Test cases to ensure the correct evaluation of dynamic check expressions and their compatibility with the assert macro.
Bounds cast expressions: Validate the functioning of variadic macros for _Dynamic_bounds_cast and _Assume_bounds_cast expressions, and their correct mapping to syntax forms or C-style casts.
Where clauses: Test cases for where clauses with optional parentheses, and the proper discarding of the where clause body when Checked C is not supported.
The test suite ensures that the alternate syntax and macros introduced for backward compatibility function correctly and maintain the safety guarantees of Checked C code, improving code portability and platform compatibility.
REGRESSION SANITY*************
Clang Regression sanity tests (TARGET: check-clang):
Testing Time: 2216.67s
Unsupported : 74
Passed : 27667
Expectedly Failed: 34
CheckedC regression sanity test (TARGET: check-checkedc)
checkedc :: checkedc/tests/typechecking/pointer_types.c
Testing Time: 17.55s
Unsupported: 3
Passed : 96
Testing Time: 3170.01s
Unsupported : 734
Passed : 69511
Expectedly Failed: 193
Failed : 12
Untouched version was failing 10 test cases.
Checking the RC behind the two extra failed TCs. Mostly could be a VM issue.
REGRESSION SANITY*************