Null characters in files
Zack Weinberg
zack@wolery.cumb.org
Mon Apr 3 11:30:00 GMT 2000
On Tue, Apr 04, 2000 at 12:09:28AM +0900, Neil Booth wrote:
> Since my patch of about a week ago which removed the special meaning
> of null characters from read_and_prescan, null characters no longer
> mangle, but get passed straight through to the lexer.
>
> With this patch null characters are handled as follows:-
>
> o Embedded in a comment, they go unnoticed
Check.
> o Embedded in a string, a warning is issued and the null ignored
I agree with Jason, in a string (or a character constant) they should
be passed through intact.
> o Elsewhere, a warning is issued and the lexer skips it
Please have it look for and skip an entire block of nulls all at
once. If the nulls came from filesystem corruption (more common than
you might think) there's likely to be, say, 512 of them in a row.
zw
More information about the Gcc-patches
mailing list