Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



It'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.


Now if only they'd kill implicit function declarations too...


Clang says it's already been killed in C99:

https://www.godbolt.org/z/KaWzsc6qT

...in GCC it's still just a warning though.


That 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.


Huh I had no idea! Seems weird that it's not an error by default!


Meh, I compile with -Werror :)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: