Re:Using the __cleanup__ variable attribute in GCC
by castratikron on Friday August 14, 2015 @12:18PM
(#10060965)
I learned about this a few years ago, but haven't made use of it at all. But I can see how it could be handy. I like using the vector attribute to make gcc generate vector instructions.
Re:Using the __cleanup__ variable attribute in GCC
by buserror on Friday August 14, 2015 @10:10AM
(#10060159)
Actually this is pretty cool, you can make the same sort of semantics as C++ stack based objects in plain C. With a couple macros you could make it pretty much feature equivalent.
Re:Using the __cleanup__ variable attribute in GCC
by slrz on Friday August 14, 2015 @06:43PM
(#10063432)
Nah. I think that for many programs the GNU extensions to C provide a better tradeoff in terms of expressiveness vs. added complexity than the truckload of arbitrary features that is C++.
Thanks for posting that!
https://github.com/systemd/systemd/blob/v224/src/basic/macro...
https://github.com/systemd/systemd/blob/v224/src/basic/macro...
https://github.com/systemd/systemd/blob/v224/src/basic/util....
https://github.com/systemd/systemd/blob/v224/src/basic/filei...
Does anyone have recommendations on great books that cover advanced C internals (other than K&R) and/or GNU extensions for C?
Advanced C: Tips and Techniques (http://www.amazon.com/Advanced-Techniques-Hayden-Books-Libra...)
No worries, it doesn't hurt, you won't have to use iterators and new.