This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49100] [OpenMP]: Compiler error when inline method defined within OpenMP loop
- From: "bisqwit at iki dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Jul 2011 10:01:39 +0000
- Subject: [Bug c++/49100] [OpenMP]: Compiler error when inline method defined within OpenMP loop
- Auto-submitted: auto-generated
- References: <bug-49100-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49100
--- Comment #3 from Joel Yliluoma <bisqwit at iki dot fi> 2011-07-25 10:01:08 UTC ---
While it's true that one should not reference the original variable within the
loop, question is, why does the inner function reference the original variable
rather than the inloop variable when there's no explicit reference to the
original variable. A reference is established, by name, within the loop, but
within the loop there should be no possible way to reference the outside-loop
variable because the inner-loop namespace shadows the outer one, and hence the
reference should bind into the inner-loop variable, thus conforming to OpenMP
specification.