[distcc] gcc bootstraps with distcc

Alexandre Oliva aoliva@redhat.com
Mon Aug 4 12:32:00 GMT 2003


On Aug  3, 2003, Neil Booth <neil@daikokuya.co.uk> wrote:

> Alexandre Oliva wrote:-
>> Then we'll have to fix the integrated preprocessor to do whatever you
>> consider to be correct.  This patch only arranges for the separate 
>> preprocessor to match what the integrated one does as far as the
>> compiler computes the line of a declaration.

> Please post an example of input and how it looks on output before
> and after.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.c
Type: text/x-c
Size: 73 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030804/e6df21ac/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.i.before
Type: text/x-c
Size: 83 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030804/e6df21ac/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.i.after
Type: text/x-c
Size: 83 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030804/e6df21ac/attachment-0002.bin>
-------------- next part --------------

Debug info with integrated preprocessor, before and after:

     DW_AT_name        : bar_
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 6
     DW_AT_type        : <37>
     DW_AT_external    : 1
[...]
     DW_AT_name        : bar
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 7
     DW_AT_type        : <37>
     DW_AT_external    : 1

     DW_AT_name        : bar_
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 6
     DW_AT_type        : <71>
     DW_AT_external    : 1
[...]
     DW_AT_name        : bar
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 7
     DW_AT_type        : <71>
     DW_AT_external    : 1

With separate preprocessor, before and after:

     DW_AT_name        : bar_
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 5
     DW_AT_type        : <37>
     DW_AT_external    : 1
[...]
     DW_AT_name        : bar
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 7
     DW_AT_type        : <37>
     DW_AT_external    : 1

     DW_AT_name        : bar_
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 6
     DW_AT_type        : <71>
     DW_AT_external    : 1
[...]
     DW_AT_name        : bar
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 7
     DW_AT_type        : <71>
     DW_AT_external    : 1

>> > Does this break people preprocessing Fortran?
>> 
>> I've no idea.  How do I tell?

> I know that changes in this area have before.  Maybe check through
> past PRs and mails to the mailing lists?

Bug 5289 is not changed at all.  The patch lets line breaks through
that were present in macro arguments, not in the macro definition or
parameter list, since these never make it to the token stream anyway,
(macros never contain line breaks after backslash-linebreak
processing) and, even if they did, they wouldn't be in the primary
context.  This patch enables the cppout's notion of current line
number to be in sync with the preprocessor's notion.  The difference
came from the fact that cb_line_change in c-lex.c doesn't take
parsing_args into account, whereas that in c-ppoutput.c does.  I
suppose it might also work to take parsing_args into account in
c-lex.c:cb_line_change, but this would be a change in behavior in the
integrated preprocessor used by default, so it could affect the
testsuite.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


More information about the Gcc-patches mailing list