๐—”๐—ป๐—ป๐—ผ๐˜‚๐—ป๐—ฐ๐—ถ๐—ป๐—ด: ๐™œ๐™˜๐™˜-๐™–๐™ง๐™จ๐™˜๐™๐™ก๐™ค๐™˜๐™ โ€“ ๐—ง๐—ต๐—ฒ ๐—ช๐—ผ๐—ฟ๐—น๐—ฑโ€™๐˜€ ๐— ๐—ผ๐˜€๐˜ ๐—ฃ๐—ฒ๐—ฑ๐—ฎ๐—ป๐˜๐—ถ๐—ฐ ๐—– ๐—–๐—ผ๐—บ๐—ฝ๐—ถ๐—น๐—ฒ๐—ฟ

Tired of your C code just working? Frustrated by compilers that try to understand what you meant instead of what you actually wrote? We at ChaosCompilersโ„ข are proud to announce ๐™œ๐™˜๐™˜-๐™–๐™ง๐™จ๐™˜๐™๐™ก๐™ค๐™˜๐™. ๐ŸŽ‰

๐™œ๐™˜๐™˜-๐™–๐™ง๐™จ๐™˜๐™๐™ก๐™ค๐™˜๐™ takes the C99 standard very seriously โ€” in the most unexpected and impractical ways possible through malicious interpretation of undefined behavior.

Stay tuned for the horrifying details! ๐Ÿง‘โ€๐Ÿ’ป

โœจ ๐—ก๐—ฒ๐˜„ ๐—™๐—ฒ๐—ฎ๐˜๐˜‚๐—ฟ๐—ฒ๐˜€ โœจ

โœ… ๐—ฅ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐—˜๐—ป๐—ฑ๐—ถ๐—ฎ๐—ป๐—ป๐—ฒ๐˜€๐˜€ โ€“ Each compilation randomly picks big-endian or little-endian.
โœ… ๐—ฆ๐—ฐ๐—ต๐—ฟ๐—ผ๐—ฒ๐—ฑ๐—ถ๐—ป๐—ด๐—ฒ๐—ฟโ€™๐˜€ ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฒ๐—ฟ๐˜€ โ€“ Signed integer overflow results in undefined consequencesโ€”sometimes a segfault, sometimes 42.
โœ… ๐—”๐—ฟ๐—ด๐˜‚๐—บ๐—ฒ๐—ป๐˜ ๐—ฆ๐—ต๐˜‚๐—ณ๐—ณ๐—น๐—ฒ ๐— ๐—ผ๐—ฑ๐—ฒโ„ข โ€“ Function arguments are evaluated in random order. Hope you werenโ€™t relying on that.
โœ… ๐—ก๐—จ๐—Ÿ๐—Ÿ ๐—œ๐˜€ ๐—ก๐—ผ๐˜ ๐—ญ๐—ฒ๐—ฟ๐—ผ - Defined as ((๐šŸ๐š˜๐š’๐š*)๐Ÿบ๐Ÿธ)
โœ… ๐—ข๐—ฑ๐—ฑ ๐—ฆ๐—ถ๐˜‡๐—ฒ๐˜€ โ€“ ๐šœ๐š’๐šฃ๐šŽ๐š˜๐š(๐š’๐š—๐š) == ๐Ÿน and ๐šœ๐š’๐šฃ๐šŽ๐š˜๐š(๐š•๐š˜๐š—๐š) == ๐Ÿฝ
โœ… ๐—ง๐—ฟ๐˜‚๐—ฒ ๐—จ๐—ป๐—ถ๐—ป๐—ถ๐˜๐—ถ๐—ฎ๐—น๐—ถ๐˜‡๐—ฒ๐—ฑ ๐—ฉ๐—ฎ๐—ฟ๐—ถ๐—ฎ๐—ฏ๐—น๐—ฒ๐˜€ โ€“ Reading them returns ๐š›๐šŠ๐š—๐š()

@fluepke > sizeof(int) == 3

that's 3 /16-bit chars/, of course - what, you wanted a byte-addressable environment?

@oddline @fluepke

How about 7 bit char, 17 bit int, and 31 bit long?