[krbdev.mit.edu #8928] [Comment] [PATCH] Constructor/destructor configure check fails on certain compilers
"Greg Hudson via RT" <[email protected]>
| Newsgroups | gmane.comp.encryption.kerberos.bugs |
|---|---|
| Message-ID | <[email protected]> |
https://krbdev.mit.edu/rt/Ticket/Display.html?id=8928 This is a comment. It is not sent to the Requestor(s): Additional notes: * The compiler line doesn't include -Werror in the options, but the error message does, which is weird. * Using godbolt.org, recent versions of the test program don't seem to give an error on the test program by default. * The presence of -fno-common in the compiler options suggests macOS (aclocal.m4 line 589). * If I explicitly configure with CFLAGS=-Werror, lots of tests go wrong. TRY_WARN_CC_FLAG_1 errors out entirely (fixable by changing "1;" to ";" in the AC_TRY_COMPILE program arguments), Tcl isn't found, functions like vsprintf and strdup aren't found, etc.. * A search of the autoconf bug list suggests that making configure work with CFLAGS=-Werror is not a design goal. It's conceivable that Apple has modified clang to error out on implicit-function-declaration by default, and that the diagnostic includes Werror due to the nature of the local modification. If so, there may be two other tests giving incorrect results. My (Linux) config.log reports an implicit declaration warning for Tcl_CreateInterp in the tcl tests and for printf in the in6addr_any test. AC_CHECK_FUNC doesn't seem to generate implicit declaration warnings all the time because it sticks a "char fnname ();" in the body, but is does generate "conflicting types for built-in function" warnings when the function being tested for has a compiler builtin.