Unreviewed patches

Kai Henningsen kaih@khms.westfalen.de
Wed Mar 30 07:25:00 GMT 2005


zack@codesourcery.com (Zack Weinberg)  wrote on 29.03.05 in <877jjpmzw7.fsf@codesourcery.com>:

> BTW, something I noticed while testing the ia64 conversion for RTH --
> if the last entry in the last file passed to opt-gather.awk is missing
> its trailing blank line, nothing bad happens.  However, if the last
> entry in any other file is missing its trailing blank line, then that
> option and the first option in the next file get mangled together.
> Could you look into that?  (I don't know if it's possible to fix;
> awk's multiple-input-file handling may not be flexible enough.)

You could always concatenate the files before feeding them to awk. That,  
of course, loses any reference to the original file in messages unless you  
then insert something like the cpp line comments and look for them in awk;  
but the point is, it's then easy to just insert a blank line between any  
two files.

Somewhat uglier would be to have a file consisting of just a blank line  
and insert that on the command line between any two other files.

Or, of course, awk might be able to DTRT.


Incidentally - one other solution that occurs to me is to have an ending  
comment at the bottom of each source file, that tells you it has to be  
preceded by at least one blank line. Makes it harder to produce the  
problem in the first place.

MfG Kai



More information about the Gcc-patches mailing list