News for hackers. Stuff that matters.
Re:C extensions, portability, and alternative compilers by account42 on Tuesday May 26, 2026 @06:16AM (#48277588)
The problem is that COMPILES( foo( int ) ) is not the same as DOES_WHAT_I_WANT_IT_TO( foo( int ) ).
Re:C extensions, portability, and alternative compilers by fc417fc802 on Tuesday May 26, 2026 @06:32AM (#48277748)
Naturally you can also implement DOES_WHAT_I_WANT_IT_TO( foo( x ) ) as a follow on. For example I have some code that relies on specific IEEE floating point properties; rather than hope for the best I explicitly test the behavior at program initialization. I also have lots of compile time tests of the form constexpr does_what_I_want() { ... } static_assert( does_what_I_want() ).