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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The problem is that the pragma is not known/registered. In that case, when
calling
libcpp/directives.c's do_pragma, the result is  p == NULL

and thus:

  if (p)
    ...
  else if (pfile->cb.def_pragma)
    ...
    pfile->cb.def_pragma (pfile, pfile->directive_line);

the latter immediately prints the '#pragma ...'

I think what needs to be done is if (p == NULL && pfile->state.in_directive) to
create a new pragma on the fly and store it in pfile->directive_result to use
it later.

 * * *

Side note: For 'gcc -E c-c++-common/gomp/pragma-1.c' the same issue occurs, but
if one adds  -fopenmp, p != NULL and everything is fine.

Reply via email to