News for hackers. Stuff that matters.
Re:New C features in GCC 13 by plq on Thursday May 04, 2023 @09:16AM (#35814789)
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

Re:New C features in GCC 13 by hgs3 on Thursday May 04, 2023 @09:22AM (#35814885)
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.
Re:New C features in GCC 13 by yrro on Thursday May 04, 2023 @09:30AM (#35815003)
Now if only they'd kill implicit function declarations too...
Re:New C features in GCC 13 by flohofwoe on Thursday May 04, 2023 @09:57AM (#35815399)
Clang says it's already been killed in C99:

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

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

Re:New C features in GCC 13 by yrro on Thursday May 04, 2023 @10:05AM (#35815522)
Huh I had no idea! Seems weird that it's not an error by default!
Re:New C features in GCC 13 by linkdd on Thursday May 04, 2023 @02:03PM (#35819617)
Meh, I compile with -Werror :)
Re:New C features in GCC 13 by ekeane on Friday May 05, 2023 @12:18AM (#35825171)
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.