https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100904
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=79516 --- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #9) > I think the issue is here: > /* This is a kludge. We want to have the ISO > preprocessor lex the next token. */ > pfile->buffer->cur = cur; > > We don't set up `buffer->rlimit`, `buffer->line_base`, nor > `buffer->need_line` correctly. Which is why the line is off by 1 and the > column is off by 2. > I think I Have a fix for this. Now thinking about it, need_line being true before the call to _cpp_handle_directive is causing PR 79516. Though there in_deferred_pragma should be false at the point of #if anyways. So that is the right fix there still. Here we definitely need to set it to false before calling _cpp_handle_directive .