This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/23269] New: gcc doesn't remove half-written object file when compiling fails


try to compile any erroneous C file (let's call it t.c) with

gcc -pipe -c -ot.o t.c

and gcc doesn't remove the half-generated t.o file.
Note that there's no space between -o and the output filename (and the -pipe is
necessary).
(the manual says that there should be a space between -o and the output
filename. However, everything works fine without it - except this)

straceing gcc reveals the cause of the problem: before exit, gcc stats '-ot.o',
not 't.o' - it thinks that the object file doesn't exist.

gcc version 4.0.2 20050725 (prerelease) (Debian 4.0.1-3)
but this problem exists in 3.3 and 3.4 too

-- 
           Summary: gcc doesn't remove half-written object file when
                    compiling fails
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hg211 at ural2 dot hszk dot bme dot hu
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23269


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]