This is the mail archive of the
mailing list for the GCC project.
Re: preprocessor/7312: bootstrap failure due to invalid use oferrno
- From: Zack Weinberg <zack at codesourcery dot com>
- To: gcc-bugs at gcc dot gnu dot org, bruno at clisp dot org
- Cc: gcc-gnats at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 09 May 2003 08:26:33 -0700
- Subject: Re: preprocessor/7312: bootstrap failure due to invalid use oferrno
I apologize for not noticing this bug earlier. It's indeed a bug, but
I don't think your suggested fix is right. At that point in the code,
nothing has been done to give errno a meaningful value, so ->err_no
should just be cleared to 0.
I will apply this patch later today, along with some other changes, if
* cppfiles.c (find_or_create_entry): Initialize file->err_no
to 0, not errno.
--- cppfiles.c 21 Apr 2003 19:21:53 -0000 1.168
+++ cppfiles.c 9 May 2003 15:24:48 -0000
@@ -184,7 +184,7 @@ find_or_create_entry (pfile, fname)
file = xcnew (struct include_file);
file->name = name;
file->header_name = name;
- file->err_no = errno;
+ file->err_no = 0;
node = splay_tree_insert (pfile->all_include_files,