https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90829
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- N.B. if you enable warnings (just -Wall is enough) then you do get a diagnostic without -fopenacc: acc.cc:2: warning: ignoring #pragma acc kernels [-Wunknown-pragmas] #pragma acc kernels loop create(f) copy(r) So again, it should be obvious why it's accepted without -fopenacc.