From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10081 invoked by alias); 10 Apr 2003 14:06: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 10055 invoked by uid 71); 10 Apr 2003 14:06:01 -0000 Resent-Date: 10 Apr 2003 14:06:01 -0000 Resent-Message-ID: <20030410140601.10054.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, platon@innotek.de (Platon Fomichev) Resent-Reply-To: gcc-gnats@gcc.gnu.org, zap@cobra.ru Received: (qmail 9224 invoked by uid 48); 10 Apr 2003 14:04:41 -0000 Message-Id: <20030410140441.9223.qmail@sources.redhat.com> Date: Thu, 10 Apr 2003 14:06:00 -0000 From: zap@cobra.ru Reply-To: zap@cobra.ru To: gcc-gnats@gcc.gnu.org Cc: platon@innotek.de (Platon Fomichev) X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: platon@innotek.de (Platon Fomichev) Subject: driver/10369: Not removing object file on Ctrl+C and not using a space between "-o" and object name X-SW-Source: 2003-04/txt/msg00432.txt.bz2 List-Id: >Number: 10369 >Category: driver >Synopsis: Not removing object file on Ctrl+C and not using a space between "-o" and object name >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Apr 10 14:06:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Andrew Zabolotny >Release: gcc 3.2.2 >Organization: >Environment: OS/2 EMX >Description: The driver has a bug that prevents it from deleting incomplete object files on pressing Ctrl+C. This happens ONLY when not using a space betwen "-o" and the file name (e.g. "-ofile.o"). This is very easy to reproduce by generating a large .c file (I did it with a simple shell script) and while it compiles, press Ctrl+C. The file.o file will remain; this is bad since it confuses make. I've tracked the problem: it is in gcc.c when executing the 'W' spec, it calls add_temporary_file_name or such (don't remember the exact function name, don't have the sources handy). The name that is passed to the function includes the -o switch (e.g. add_temporary_file_name ("-ofile.o")) and on failure the driver tries to delete the file with this name, and naturally fails. >How-To-Repeat: gcc -c -ofile.o file.c >Fix: Not sure, this requires deep knowledge of how specs are parsed and executed. A quick-and-dirty patch is possible, but I presume whoever knows the internals will do it a lot better. >Release-Note: >Audit-Trail: >Unformatted: