Skip to content
Snippets Groups Projects
  • Nat Goodspeed's avatar
    2499f6bc
    DRTVWR-418: Casting pointer to BOOL is just wrong. · 2499f6bc
    Nat Goodspeed authored
    Since BOOL is simply a typedef for int, casting a 64-bit pointer to 32-bit int
    is correctly diagnosed by the compiler as an error.
    
    What works is to cast the pointer to (lowercase) bool, the builtin type, which
    engages the compiler's test for "is this pointer NULL?"
    2499f6bc
    History
    DRTVWR-418: Casting pointer to BOOL is just wrong.
    Nat Goodspeed authored
    Since BOOL is simply a typedef for int, casting a 64-bit pointer to 32-bit int
    is correctly diagnosed by the compiler as an error.
    
    What works is to cast the pointer to (lowercase) bool, the builtin type, which
    engages the compiler's test for "is this pointer NULL?"
Code owners
Assign users and groups as approvers for specific file changes. Learn more.