title: Is there any difference between variables in a private clause and variables defined within a parallel region in OpenMP?
body: <p>I was wondering if there is any reason for preferring the <code>private(var)</code> clause in OpenMP over the local definition of (private) variables, i.e.</p>
  
  <pre><code>int var;
  #pragma omp parallel private(var)
  {
      ...
  }
  </code></pre>
  
  <p>vs.</p>
  
  <pre><code>#pragma omp parallel
  {
      int var;
      ...
  }
  </code></pre>
  
  <p>Also, I'm wondering what's the point of private clauses then. This question was partially explained in <a href="https://stackoverflow.com/questions/6358375/openmp-are-local-variables-automatically-private/6359272#6359272">OpenMP: are local variables automatically private?</a>, but I don't like the answer since even C89 doesn't bar you from defining variables in the middle of functions as long as they are in the beginning of a scope (which is automatically the case when you enter a parallel region). So even for old-fashion C-programmers this shouldn't make any difference.
  Should I consider this as syntactic sugar that allows for a "define-variables-in-the-beginning-of-your-function" style as used in the good old days?</p>
  
  <p>By the way: In my opinion the second version also prevents programmers from using private variables after the parallel region in the hope that it may contain something useful so another -1 for the private clause.</p>
  
  <p>But since I'm quite new to OpenMP I don't want to question anything without having a good explanation for it. Thanks in advance for your answers!</p>