This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Null characters in files
- To: Neil Booth <NeilB at earthling dot net>
- Subject: Re: Null characters in files
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Mon, 3 Apr 2000 11:29:50 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <E12c8To-000815-00@monkey.rosenet.ne.jp>
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