Liste des Groupes | Revenir à cl c |
On 03.04.2025 11:03, David Brown wrote:To be clear, we are talking about :On 02/04/2025 23:43, Janis Papanagnou wrote:Really, that recent!? - I was positive that I used it long before 2017On 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.
during the days when I did quite regularly C++ programming. - Could it
be that some GNU compiler (C++ or "C") supported that before it became
C++ standard?
Janis
Les messages affichés proviennent d'usenet.