https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90829
Bug ID: 90829 Summary: -fopenacc expects iteration declaration or initialization Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zhonghao at pku dot org.cn Target Milestone: --- My gcc is 10.0.0, and the code is: void foo(float *f, double *r) { #pragma acc kernels loop create(f) copy(r) for(;;) {} } gcc accepts the code, but with -fopenacc, it rejects it: <source>: In function 'void foo(float*, double*)': <source>:3:1: error: expected iteration declaration or initialization 3 | for(;;) {} | ^~~ Compiler returned: 1 Shall programmers explicitly provide iteration declaration or initialization, with -fopenacc? If it is case, it is worth mentioning the requirement in its manual.