-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
This code depends on the integer rank and returns true
Line 1206 in e8d24cf
| if (AutoOffTimer == -1){ |
example:
https://godbolt.org/z/n7Tavjc6W
relevant rules:
https://eel.is/c++draft/expr.arith.conv#1.5
https://eel.is/c++draft/expr.eq#8
but this example always false:
https://godbolt.org/z/a6jhjae1E
The int type has a non-fixed size in bits (implementation dependent) (-1 is a literal of type int)
If the stdint.h header is available, the UINTN_MAX definition can be used (N is the bit size of the integer type).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request