bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #110400] autoconf 2.70 no longer supports clang with -Wextra-semi-st


From: Bruno Haible
Subject: [sr #110400] autoconf 2.70 no longer supports clang with -Wextra-semi-stmt warning enabled
Date: Fri, 11 Dec 2020 21:02:13 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

Follow-up Comment #1, sr #110400 (project autoconf):

The error happens in the expansion of the macro _AC_UNDECLARED_WARNING:


      # For AC_CHECK_DECL to react to warnings, the compiler must be silent
on
    # valid AC_CHECK_DECL input.  No library function is consistently
available
    # on freestanding implementations, so test against a dummy declaration.
    # Include always-available headers on the off chance that they somehow
    # elicit warnings.
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <float.h>
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
extern void ac_decl (int, char *);
int
main (void)
{
#ifdef __cplusplus
  (void) ac_decl ((int) 0, (char *) 0);
  (void) ac_decl;
#else
  (void) ac_decl;
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  if test -s conftest.err
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot detect from compiler exit status or warnings
See \`config.log' for more details" "$LINENO" 5; }


The problem here is the semicolon before 'return 0', which comes from the
AC_LANG_PROGRAM macro. It triggers a clang warning. And since all or most test
programs used by Autoconf are pieced together using AC_LANG_PROGRAM, the
presence of warnings cannot be used to detect anything about the test program.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110400>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]