Ignore -Wincomplete-setjmp-declaration warnings
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 13 Feb 2020 15:35:34 +0000 (10:35 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 10 Mar 2020 02:12:53 +0000 (22:12 -0400)
We currently get this when building a test that requires UST:

    make[4]: Entering directory '/home/smarchi/build/lttng-tools-clang/tests/regression/ust/linking'
      CC       tp.lo
    In file included from /home/smarchi/src/lttng-tools/tests/regression/ust/linking/tp.c:11:
    In file included from /home/smarchi/src/lttng-tools/tests/regression/ust/linking/./ust_tests_demo.h:38:
    In file included from /home/smarchi/install/include/lttng/tracepoint-event.h:58:
    In file included from /home/smarchi/install/include/lttng/ust-tracepoint-event.h:28:
    In file included from /home/smarchi/install/include/lttng/ust-events.h:41:
    /usr/include/pthread.h:744:12: error: declaration of built-in
    function '__sigsetjmp' requires the declaration of the 'jmp_buf'
    type, commonly provided in the header
    <setjmp.h>. [-Werror,-Wincomplete-setjmp-declaration]
    extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
               ^

I'm not sure what we can do about it, and I believe the warning is
bogus.  I do have a definition for the "jmp_buf" type in
/usr/include/setjmp.h:

    typedef struct __jmp_buf_tag jmp_buf[1];

And even with I include <setjmp.h>, the warning does not go away.  I'm
not sure if that's right, but this patch disables the warning.

Change-Id: Ibe7451dc0afc9aaca59431296d42011d9e4306f9
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
configure.ac

index 7b284593474f4d7109dbb57a2659c9e5a7ca1adf..e3b23f4658b87874b857eec6774050c93474fda3 100644 (file)
@@ -32,6 +32,12 @@ AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
 # -Wunknown-warning-option diagnostic fatal with clang.
 AX_APPEND_COMPILE_FLAGS([ dnl
                -Wall dnl
+               dnl We currently get this warning when building with Clang:
+               dnl
+               dnl /usr/include/setjmp.h:54:12: error: declaration of built-in function '__sigsetjmp' requires the declaration of the 'jmp_buf' type, commonly provided in the header <setjmp.h>. [-Werror,-Wincomplete-setjmp-declaration]
+               dnl extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL;
+               dnl            ^
+               -Wno-incomplete-setjmp-declaration dnl
        ],
        [WARN_CFLAGS],
        [-Werror])
This page took 0.034442 seconds and 4 git commands to generate.