News for hackers. Stuff that matters.
Re:Show HN: Smart pointers for the C programming language by kazinator on Wednesday January 14, 2015 @12:11PM (#8887529)
This relies on support in the GCC infrastructure. That support is there thanks to the back-end support for C++. Calling it "for the C language" is misleading, insinuating portability at the language level.

The title should be: "Smart pointers for the GNU C programming language".

If you could have smart pointers in the C language via a couple of macros, it would have been done several decades ago. Of course, it can be done by a code transformation: make a C-like language which translates to C. Wait, that was done by someone named Bjarne Stroustrup in a project called "C with Classes". People didn't accept that was C though, even when he shortened the name to C++.

Re:Show HN: Smart pointers for the C programming language by Snaipe on Wednesday January 14, 2015 @12:18PM (#8887588)
I guess you're right. This was mostly an exercise on the attributes provided by gcc and clang/llvm, since I haven't seen anything really using RAII.