4 ms·
> Use __attribute__((cleanup)). It's available in GCC and Clang Really, don’t do this, it’s a portability nightmare. If you’re going to write C stick to code t
by forrestthewoods 2y ago
> Use __attribute__((cleanup)). It's available in GCC and Clang
Really, don’t do this, it’s a portability nightmare. If you’re going to write C stick to code that easy to run under MSVC.
- rossy 2y agoRunning under MSVC is overrated and more trouble than its worth. Clang and mingw-w64 GCC work just fine for targeting Windows.
- fc417fc802 2y agoRunning under MSVC implies I'm building on Windows. In reality I'm cross compiling with Clang.
- forrestthewoods 2y agoIt’s a shame that glibc is so badly designed that cross-compiling for Linux is only vaguely possible because Andrew Kelley moved mountains via Zig.
- forrestthewoods 2y agoDisagree. It’s fine and trivially easy. It’s only hard for Linux people who build software for Linux first and only. Then have a shocked pikachu face when they need to run in a different environment. mingw is radically more problematic than MSVC. Don’t use mingw.