https://github.com/Sirraide commented:
The main thing I’m still not sure about since I noticed that we allow this is whether it’s a bug or a ‘feature’ (I could imagine some horrible macros maybe making use of this but there ought to be better alternatives...), because we also allow this for `for` and `do while` loops, and at least in the case of the former it’s quite intentional apparently: a875721d8a2dacb894106a2cefa18828bf08f25d *If* it is intentional for the other loops too we should definitely document that though because it’s rather odd out of context... CC @zygoloid: Also, the commit above cites GCC compatibility as a reason for allowing this in `for` loops, but I can’t seem to find a GCC version on godbolt that actually accepts this or any of our test cases that that commit added. So unless I’m missing something, it doesn’t seem like GCC ever actually supported this? https://github.com/llvm/llvm-project/pull/152606 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits