[Bug preprocessor/93075] Incorrect line number in DW_MACRO_start_file entry of file included via "-include" option

tatyana at synopsys dot com gcc-bugzilla@gcc.gnu.org
Thu Jan 9 09:46:00 GMT 2020


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

--- Comment #2 from tatyana at synopsys dot com ---
>  the only suspicious thing is that both stdc-predef.h and t2.h appear to be
>  at lineno 31/32?

Yes, line numbers for "-include" files also start from 31 for me.

The question is also should 'lineno' be 1 for t.h, or it should be incremented
twice (like if #include <stdc-predef.h> and #include "t2.h" were before it)?

I expected to see

 DW_MACRO_import - offset : 0x0
 DW_MACRO_start_file - lineno: 0 filenum: 1 filename: t.c
 DW_MACRO_start_file - lineno: 1 filenum: 2 filename:
/usr/include/stdc-predef.h
 DW_MACRO_import - offset : 0x0
 DW_MACRO_end_file
 DW_MACRO_start_file - lineno: 2 filenum: 3 filename: ./t2.h
 DW_MACRO_define_strp - lineno : 1 macro : BAR 1
 DW_MACRO_end_file
 DW_MACRO_start_file - lineno: 3 filenum: 4 filename: t.h
 DW_MACRO_define_strp - lineno : 1 macro : FOO 1
 DW_MACRO_end_file
 DW_MACRO_end_file


More information about the Gcc-bugs mailing list