Hacker News new | ask | show | jobs
by RicardoLuis0 1386 days ago
that's still wrong, the integer data model is defined by the target, which is not specified in the quiz, not solely by the compiler, ex. clang uses 32-bit longs when compiling for windows, and 64-bit longs when compiling for linux:

* windows - https://godbolt.org/z/WWWzarEsK

* linux - https://godbolt.org/z/57WK45o6e

same for gcc on linux/windows (mingw)

1 comments

Are there any GCC or LLVM targets where short is the same size as int?
Motorola 68K target with -mshort option.
Any 8 or 16 bit micro controllers like the AVR.