Colin Walters

I put my pants on just like the rest of you — one leg at a time. Except, once my pants are on, I make Free Software.

Menu

Skip to content
  • Home
  • About

Monthly Archives: May 2012

__attribute__ ((cleanup)), or how I came to love C again

Colin WaltersMay 9, 20128

If your project is written in C, and you don’t mind having a hard dependency on GCC (i.e. you don’t care about building with MSVC++), this GNU C extension does amazing things for your code.

There are other GNU C extensions that are simultaneously useless and crazy, but __attribute__ ((cleanup)) makes up for everything else. For reference, here’s a discussion about using it in GNOME.

Blog at WordPress.com.
  • Subscribe Subscribed
    • Colin Walters
    • Already have a WordPress.com account? Log in now.
    • Colin Walters
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar