Consider a large project, where many types are typedef
\'d, e.g.
typedef int age;
typedef int height;
and some functions gettin
Error will be generated only when types are different. can you wrap these types inside struct and use macros to automate definition and assignment.
If you are willing to use enum instead of integers then there is an option for warnings on use of mixed enums in static code analysis tool named coverity.
https://wiki.ubuntu.com/CoverityCheckerDictionary look for MIXED_ENUMS.