driver/10369: Not removing object file on Ctrl+C and not using a space between "-o" and object name

zap@cobra.ru zap@cobra.ru
Thu Apr 10 14:06:00 GMT 2003


>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:



More information about the Gcc-prs mailing list