by albinofrenchy · 11y ago · 0 comments
Good spot though; I kind of doubt that this was a conscience design decision and probably just a slip up.
And agreed, good catch.
EDIT: looking at the documentation, it appears that __int8 is supposed to always be an alias for `char`, even as far back as 2003: https://msdn.microsoft.com/en-us/library/29dh1w7z(v=vs.71).a.... However, the workaround found in msinttypes suggests that Visual Studio 6 does have this problem. I weep for those still using it.
In any case, it isn't as if the language doesn't allow for type alias.
And here we have a prime example of Chrome, a major cross-platform project with high visibility that is not using these types nor didn't define their own in this case. These types were intended to help reduce mistakes. But compiler fragmentation basically resulted in organizations avoiding it, leading to these types of mistakes that could have been avoided in the first place.
Still, at least nowadays there is no excuse -- everything from TI to VC++ supports stdint variations.