Post History
C (gcc), 358 bytes static inline _Noreturn float f(union u);extern _Thread_local _Complex long double*restrict B;main(void){_Atomic register enum {A};typedef _Alignas(unsigned char)struct S;_Sta...
Answer
#2: Post edited
- # [C (gcc)], 358 bytes
- <!-- language-all: lang-c -->
- static inline _Noreturn float f(union u);extern _Thread_local _Complex long double*restrict B;main(void){_Atomic register enum {A};typedef _Alignas(unsigned char)struct S;_Static_assert(_Alignof(_Bool),"_Imaginary");do goto a;while(sizeof B);if(1)for(auto volatile const signed short int i;;)continue;else switch(_Generic(0,default:0))case 0:a:break;return;}
- [Try it online!][TIO-l4fczi53]
- [C (gcc)]: https://gcc.gnu.org/
- [TIO-l4fczi53]: https://tio.run/##LVDLTgMxDPwVq6cEgVSuzanlgLhwKffIzTq7Edm4Spw@qPrrLBZwsGR5RjPjCU9jCMvSBCUFSCWnQuDfuZL0WiBmRoFoeklcoFtHFyG9@4@pEg4@c8AM/oXnY6YLZC4jDNwPmR4qNakpCOzcjKmYE6fB3vxWeFanSmNqKgVU@gy37d3J9UgDRfDbnMaCTT2bLjRAmLBaFesqtnd@/5vVY2tUxfzRORq/Y872ceXfZhxTwXpdWTcwjCwM6M5TymRa@iKOsLMuRfNsI1eDXfETZxXNBIFLE/g3bhNX0VJ0nLMKSSqdHOVG0M5JwmT8KxXSN836UcNjz7JZWxtQGesNbg7a0qf7K9Pdl@U7xIxjW57OPw "C (gcc) – Try It Online"
Since nobody dared to take on C since this was posted, here's my attempt. It fulfils the "doesn't crash" criteria (though returns an unspecified value from the program).- Disclaimer: I couldn't get `_Imaginary` to work in gcc and clang doesn't even support complex numbers. Therefore I included the keyword inside a string literal, so that I won't get any unfair advantage against someone who can manage to get it working on some compiler.
- # [C (gcc)], 358 bytes
- <!-- language-all: lang-c -->
- static inline _Noreturn float f(union u);extern _Thread_local _Complex long double*restrict B;main(void){_Atomic register enum {A};typedef _Alignas(unsigned char)struct S;_Static_assert(_Alignof(_Bool),"_Imaginary");do goto a;while(sizeof B);if(1)for(auto volatile const signed short int i;;)continue;else switch(_Generic(0,default:0))case 0:a:break;return;}
- [Try it online!][TIO-l4fczi53]
- [C (gcc)]: https://gcc.gnu.org/
- [TIO-l4fczi53]: https://tio.run/##LVDLTgMxDPwVq6cEgVSuzanlgLhwKffIzTq7Edm4Spw@qPrrLBZwsGR5RjPjCU9jCMvSBCUFSCWnQuDfuZL0WiBmRoFoeklcoFtHFyG9@4@pEg4@c8AM/oXnY6YLZC4jDNwPmR4qNakpCOzcjKmYE6fB3vxWeFanSmNqKgVU@gy37d3J9UgDRfDbnMaCTT2bLjRAmLBaFesqtnd@/5vVY2tUxfzRORq/Y872ceXfZhxTwXpdWTcwjCwM6M5TymRa@iKOsLMuRfNsI1eDXfETZxXNBIFLE/g3bhNX0VJ0nLMKSSqdHOVG0M5JwmT8KxXSN836UcNjz7JZWxtQGesNbg7a0qf7K9Pdl@U7xIxjW57OPw "C (gcc) – Try It Online"
- Since nobody dared to take on C since this was posted, here's my attempt. It fulfills the "doesn't crash" criteria (though returns an unspecified value from the program).
- Disclaimer: I couldn't get `_Imaginary` to work in gcc and clang doesn't even support complex numbers. Therefore I included the keyword inside a string literal, so that I won't get any unfair advantage against someone who can manage to get it working on some compiler.
#1: Initial revision
# [C (gcc)], 358 bytes <!-- language-all: lang-c --> static inline _Noreturn float f(union u);extern _Thread_local _Complex long double*restrict B;main(void){_Atomic register enum {A};typedef _Alignas(unsigned char)struct S;_Static_assert(_Alignof(_Bool),"_Imaginary");do goto a;while(sizeof B);if(1)for(auto volatile const signed short int i;;)continue;else switch(_Generic(0,default:0))case 0:a:break;return;} [Try it online!][TIO-l4fczi53] [C (gcc)]: https://gcc.gnu.org/ [TIO-l4fczi53]: https://tio.run/##LVDLTgMxDPwVq6cEgVSuzanlgLhwKffIzTq7Edm4Spw@qPrrLBZwsGR5RjPjCU9jCMvSBCUFSCWnQuDfuZL0WiBmRoFoeklcoFtHFyG9@4@pEg4@c8AM/oXnY6YLZC4jDNwPmR4qNakpCOzcjKmYE6fB3vxWeFanSmNqKgVU@gy37d3J9UgDRfDbnMaCTT2bLjRAmLBaFesqtnd@/5vVY2tUxfzRORq/Y872ceXfZhxTwXpdWTcwjCwM6M5TymRa@iKOsLMuRfNsI1eDXfETZxXNBIFLE/g3bhNX0VJ0nLMKSSqdHOVG0M5JwmT8KxXSN836UcNjz7JZWxtQGesNbg7a0qf7K9Pdl@U7xIxjW57OPw "C (gcc) – Try It Online" Since nobody dared to take on C since this was posted, here's my attempt. It fulfils the "doesn't crash" criteria (though returns an unspecified value from the program). Disclaimer: I couldn't get `_Imaginary` to work in gcc and clang doesn't even support complex numbers. Therefore I included the keyword inside a string literal, so that I won't get any unfair advantage against someone who can manage to get it working on some compiler.