From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18135 invoked by alias); 30 Nov 2001 23:16:08 -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 18081 invoked by uid 71); 30 Nov 2001 23:16:02 -0000 Resent-Date: 30 Nov 2001 23:16:02 -0000 Resent-Message-ID: <20011130231602.18080.qmail@sourceware.cygnus.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, ahare@btinternet.com Received:(qmail 16511 invoked by uid 61); 30 Nov 2001 23:09:59 -0000 Message-Id:<20011130230959.16510.qmail@sourceware.cygnus.com> Date: Fri, 23 Nov 2001 01:44:00 -0000 From: ahare@btinternet.com Reply-To: ahare@btinternet.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.2 (1.1.1.1.2.21) Subject: other/4977: fix-header seg fault with recursive header files X-SW-Source: 2001-11/txt/msg00788.txt.bz2 List-Id: >Number: 4977 >Category: other >Synopsis: fix-header seg fault with recursive header files >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Nov 30 15:16:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Andy Hare >Release: Current CVS >Organization: >Environment: Cygwin hosted cross compiling for arm-elf >Description: During building of a cross-compiler for the arm-elf using newlib, fix-header seg faults whilst working on dirent.h. Working through and getting fix-header to display the inlcuded files being opened shows that a recursive opening is happening. By stoping the recursive calling the problem goes away. scan_decls() function causes the problem where extern_C_braces_length gets longer than the array index it is being used as. Disscussion on gcc-bugs mailing list under subject : Problems compiling current CVS under cygwin. This gives more detail on the exact setup of the cross configure and build, as well as actual generated error messages. >How-To-Repeat: The following lines fails every time until the recursive dirent.h is removed. /build/arm/gcc/gcc/fix-header dirent.h /xgcc-arm/gnu/arm-elf/sys-include/dirent.h /build/arm/gcc/gcc/include/dirent.h -D__STDC__=0 -D__cplusplus -I/build/arm/ gcc/gcc/include -I/xgcc-arm/gnu/arm-elf/sys-include >Fix: No fix, the work around is to remove the recursive header file. Ideally the fix-header program should fail with an error message indicating a recursive problem, not just crash. >Release-Note: >Audit-Trail: >Unformatted: