Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions c/common/src/codingstandards/c/Extensions.qll
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,7 @@ class CTerseTernaryExtension extends CCompilerExtension, ConditionalExpr {
// Reference: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html#g_t_005f_005fint128
// Reference: https://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html#Decimal-Float
class CRealTypeExtensionExtension extends CCompilerExtension, DeclarationEntry {
CRealTypeExtensionExtension() {
getType() instanceof Decimal128Type or
getType() instanceof Decimal32Type or
getType() instanceof Decimal64Type or
getType() instanceof Float128Type
}
CRealTypeExtensionExtension() { getType() instanceof Float128Type }
Copy link

Choose a reason for hiding this comment

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

This looks good to me, but (1) what is CRealTypeExtensionExtension used for and (2) is there someone from coding standards who can approve this?

Copy link
Collaborator Author

@jketema jketema Jan 13, 2026

Choose a reason for hiding this comment

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

(1) what is CRealTypeExtensionExtension used for

It used to check that these types are not used in code that should satisfy the coding standards rules. For the Decimal types this could be replaced by QL code that looks for the relevant parse errors.

(2) is there someone from coding standards who can approve this?

The agreement is that everything targeting the next branch is fully under our control and there's no need to involve them.


override string getMessage() {
result = "Decimal floats are a compiler extension and are not portable to other compilers."
Expand Down
Loading