This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/49100] [OpenMP]: Compiler error when inline method defined within OpenMP loop


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]