[LLVMbugs] [Bug 2280] New: clang: no output should be produced when errors occurs
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun May 4 02:53:22 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2280
Summary: clang: no output should be produced when errors occurs
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu
When an error occurs, clang still creates the output file, which is a problem
because make will believe that compiling succeeded the 2nd time I run it.
$ make others.o
source='../../../trunk/clamscan/others.c' object='others.o' libtool=no \
DEPDIR=.deps depmode=none /bin/sh ../../../trunk/config/depcomp \
/home/edwin/llvm-svn/llvm/tools/clang/utils/ccc -DHAVE_CONFIG_H
-DCL_NOTHREADS -I. -I../../../trunk/clamscan -I.. -I../../../trunk
-I../../../trunk/shared -I../../../trunk/libclamav -g -O2 -c
../../../trunk/clamscan/others.c
../../../trunk/clamscan/others.c
clang -emit-llvm-bc -x c -o others.o ../../../trunk/clamscan/others.c
-DHAVE_CONFIG_H -DCL_NOTHREADS -I. -I../../../trunk/clamscan -I..
-I../../../trunk -I../../../trunk/shared -I../../../trunk/libclamav
int (identifier)(char const *, short)
../../../trunk/clamscan/others.c:115:8: error: incompatible type passing 'int
*', expected '__WAIT_STATUS'
wait(&status);
^~~~~~~
1 diagnostic generated.
make: *** [others.o] Error 1
$ make others.o
make: `others.o' is up to date.
The generated file contains some functions, except the one where the failure
occured. In the end I get linker errors because of the missing function, and
make no longer tells me which file failed to compile.
A workaround is to 'make clean' each time, but I think it would be best to
delete the output file in case of an error.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list