4 ms·
All quite reasonable additions to the language, kudos to the GCC team. I'm /very/ sad to see the unprototyped functions to go though -- that was my favourite w
by plq 3y ago
All quite reasonable additions to the language, kudos to the GCC team.
I'm /very/ sad to see the unprototyped functions to go though -- that was my favourite way to catch newbies off-guard! Oh well ...
As for those who like to spend their Friday afternoon feeling sad about C++isms creeping into C: You are very late! You should have done that when GCC implemented ``__attribute__((cleanup))`` years^Wdecades ago.
edit: https://gcc.gnu.org/legacy-ml/gcc/2003-05/msg00528.html https://gcc.gnu.org/legacy-ml/gcc/2003-05/msg00528.html
- hgs3 3y agoIt's unfortunate that a scope cleanup mechanism, like __attribute__((cleanup)), wasn't introduced. There was a proposal for one but it relied on lambda's which didn't make the cut for C23.
- yrro 3y agoNow if only they'd kill implicit function declarations too...
- flohofwoe 3y agoClang says it's already been killed in C99: https://www.godbolt.org/z/KaWzsc6qT https://www.godbolt.org/z/KaWzsc6qT ...in GCC it's still just a warning though.
- yrro 3y agoHuh I had no idea! Seems weird that it's not an error by default!
- linkdd 3y agoMeh, I compile with -Werror :)
- ekeane 3y agoThat is a 'warning as default error', so for at least Clang16, it is still disable-able. The Clang code owner is on a bit of a well-deserved war-path against these, so they are likely to be completely illegal in the next version or two.