From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20435 invoked by alias); 9 May 2003 15:36:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20393 invoked by uid 71); 9 May 2003 15:36:01 -0000 Date: Fri, 09 May 2003 15:36:00 -0000 Message-ID: <20030509153601.20392.qmail@sources.redhat.com> To: zack@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Zack Weinberg Subject: Re: preprocessor/7312: bootstrap failure due to invalid use of errno Reply-To: Zack Weinberg X-SW-Source: 2003-05/txt/msg00760.txt.bz2 List-Id: The following reply was made to PR preprocessor/7312; it has been noted by GNATS. From: Zack Weinberg To: gcc-bugs@gcc.gnu.org, bruno@clisp.org Cc: gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: preprocessor/7312: bootstrap failure due to invalid use of errno Date: Fri, 09 May 2003 08:26:33 -0700 http://gcc.gnu.org/PR?7312 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 bootstrap succeeds. zw PR preprocessor/7312 * cppfiles.c (find_or_create_entry): Initialize file->err_no to 0, not errno. =================================================================== Index: cppfiles.c --- 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, (splay_tree_key) file->name, (splay_tree_value) file);