Created
December 30, 2017 11:08
-
-
Save bolry/2977b59ef4e6300582f95a3245168ffe to your computer and use it in GitHub Desktop.
Let compiler check you typedefs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
char int8_err [-1 + 2 * (sizeof(int8_t) == 1)]; | |
char uint8_err [-1 + 2 * (sizeof(uint8_t) == 1)]; | |
char int16_err [-1 + 2 * (sizeof(int16_t) == 2)]; | |
char uint16_err[-1 + 2 * (sizeof(uint16_t) == 2)]; | |
char int32_err [-1 + 2 * (sizeof(int32_t) == 4)]; | |
char uint32_err[-1 + 2 * (sizeof(uint32_t) == 4)]; | |
} throwaway_t; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment