+2003-09-24 Alexandre Oliva <aoliva@redhat.com>
+
+ * cpplib.c (do_pragma): Reintroduce cb_line_change call in the
+ code path that calls a handler.
+
2003-09-24 Nathanael Nerode <neroden@gcc.gnu.org>
* config.gcc (c4x-*, tic4x-*, d30v-*, mmix-knuth-mmixware):
do_pragma (cpp_reader *pfile)
{
const struct pragma_entry *p = NULL;
- const cpp_token *token;
+ const cpp_token *token, *pragma_token = pfile->cur_token;
unsigned int count = 1;
pfile->state.prevent_expansion++;
}
if (p)
- p->u.handler (pfile);
+ {
+ /* Since the handler below doesn't get the line number, that it
+ might need for diagnostics, make sure it has the right
+ numbers in place. */
+ if (pfile->cb.line_change)
+ (*pfile->cb.line_change) (pfile, pragma_token, false);
+ (*p->u.handler) (pfile);
+ if (pfile->cb.line_change)
+ (*pfile->cb.line_change) (pfile, pfile->cur_token, false);
+
+ }
else if (pfile->cb.def_pragma)
{
_cpp_backup_tokens (pfile, count);