https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80161

--- Comment #2 from Jeff Hammond <jeff.science at gmail dot com> ---
Fair point, but the error is "error: the last argument must be scale 1, 2, 4,
8" and "const int scale = 1" sure seems like it should be interpreted by the
compiler as "1", given "scale" has local scope (the error persists even after I
move it inside the parallel region).

And if the compiler is enforcing the lack of const variables in C, should it
not do so consistently, and not just when OpenMP is used?  Why does OpenMP
prevent the compiler from seeing that scale=1, even if const is not there?

Reply via email to