[LLVMbugs] [Bug 6950] New: scan-build for configure script that uses AC_LANG_WERROR does not work as expected

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 27 04:03:57 PDT 2010


           Summary: scan-build for configure script that uses
                    AC_LANG_WERROR does not work as expected
           Product: clang
           Version: 2.6
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: simon at comsys.ntu-kpi.kiev.ua
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=4741)
 --> (http://llvm.org/bugs/attachment.cgi?id=4741)
Configure script that uses AC_LANG_WERROR

clang-2.6_3, llvm-2.6_2, autoconf-2.62 on FreeBSD 8.0-STABLE, everything
installed from FreeBSD Ports.

There is the configure script that uses AC_LANG_WERROR to verify whether the C
compiler shows any warnings about code inside AC_COMPILE_IFELSE(). Actually it
checks whether a compiler understands attributes like "noreturn", "format",
"unused", etc.

This script correctly works with GCC, but when it runs under scan-build control
all checks after AC_LANG_WERROR failed. As I understand these checks failed
since scan-build outputs "ANALYZE: ..." strings for the input file.

There is a simple configure.ac in the attachment and this is corresponding
config.log for it:

configure:3389: checking attribute "noreturn"
configure:3416: /usr/local/bin/ccc-analyzer -c -g -O2  conftest.c >&5
ANALYZE: conftest.c bar
configure:3423: $? = 0
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "test"
| #define PACKAGE_TARNAME "test"
| #define PACKAGE_VERSION "1"
| #define PACKAGE_STRING "test 1"
| #define PACKAGE_BUGREPORT "me at home"
| #define PACKAGE "test"
| #define VERSION "1"
| /* end confdefs.h.  */
| #include <stdlib.h>
| void bar(void) __attribute__ ((noreturn));
| void
| bar(void)
| {
|     exit(0);
| }
configure:3438: result: no

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