News for hackers. Stuff that matters.
Re:Rejuvenating the Microsoft C/C++ Compiler by wnissen on Friday September 25, 2015 @01:39PM (#10279512)
All excellent points, and I would add that it changes the semantics of the code when it comes to threading, which is will be a more and more major issue going forward. If the variable is declared outside the parallel section (such as a for loop), it's assumed that it is shared (and therefore synchronized), while if it's declared inside it is clearly private to each thread and no synchronization is required.
Re:Rejuvenating the Microsoft C/C++ Compiler by bluecalm on Friday September 25, 2015 @03:02PM (#10280017)
We are talking about top of the block. When you are creating a parallel section you have a new block/scope there so that argument doesn't apply. Both styles are the same when it comes to scope of the variables.