Liste des Groupes | Revenir à cl c |
On 02/04/2025 23:43, Janis Papanagnou wrote:On 02.04.2025 16:59, David Brown wrote:[...]>
>
From the next version beyond C23, so far there is :
>
1. Declarations in "if" and "switch" statements, like those in "for"
loops, helps keep local variable scopes small and neat.
Oh, I thought that would already be supported in some existing "C"
version for the 'if'; I probably confused that with C++.
>
C++17 has it.
I guess the C committee waited until C++17 had been common enough that
they could see if it was useful in real code, and if it lead to any
unexpected problems in code or compilers before copying it for C.
Les messages affichés proviennent d'usenet.