News for hackers. Stuff that matters.
Re:Humans should think of sizeof() as a function, says Linus... by dllthomas on Saturday May 30, 2015 @03:35PM (#9631489)
"There is no need to put braces around the contents of a case block."

There is here.

In some dialects, you can only declare a variable at the start of a block. From the perspective of the compiler, a "case block" isn't actually a block, just stuff between labels. In order to declare temporary_variable, it may be necessary to put the braces, and it is probably best practice as temporary_variable may otherwise be exposed to later cases (and in C++, a jump over a variable declaration seems to produce an error).

There are no comments on this comment yet.