- Macro for GCC 13, 14 uses Jens Gusted macro
- How far into the past versions this works I did not checked
- see
defer_gcc.hfor simpple usage - 2025Q4, I am not 100% sure if that will be the final official
defer Makefileis for Linux cli onlydeferis being standardized asTechnical Specification TS 25755for potential inclusion inC2y(the next C standard, likely 2029).
- for MSVC (aka CL) macro uses Win32 Structured Exception Handling (SEH)
- see
msvc_defer_we_preffer.h - You need to be on win32 cli to use this
- The rest of win32 requirements code buidling on Win machine, I am sure you know.
- see
Basicaly not ideal. But simple and working defer. Making your C23 code safer. Right now. Even MSVC code.
Enjoy!
[email protected] , CC BY SA 4.0