* [Buildroot] NDEBUG breaks compilation of GCC 10
@ 2021-06-14 9:22 Andreas Ziegler
0 siblings, 0 replies; only message in thread
From: Andreas Ziegler @ 2021-06-14 9:22 UTC (permalink / raw)
To: buildroot
Dear all,
I seem to attract all the corner cases :-(
After the merge with the recent 'next' branch, compilation of GCC10
breaks in the gcc-final step.
musl/assert.h:
#ifdef NDEBUG
#define assert(x) (void)0
#else
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__,
__func__),0)))
#endif
gcc/libgomp/target.c:
{
struct target_mem_desc *k_tgt = k->tgt;
bool is_tgt_unmapped = gomp_remove_var (devicep, k);
/* It would be bad if TGT got unmapped while we're still iterating
over its LIST_COUNT, and also expect to use it in the following
code. */
assert (!is_tgt_unmapped
|| k_tgt != tgt);
}
Build log:
../../../libgomp/target.c: In function ?gomp_unmap_vars_internal?:
../../../libgomp/target.c:1474:9: error: unused variable
?is_tgt_unmapped? [-Werror=unused-variable]
1474 | bool is_tgt_unmapped = gomp_remove_var (devicep, k);
| ^~~~~~~~~~~~~~~
../../../libgomp/target.c:1473:28: error: unused variable ?k_tgt?
[-Werror=unused-variable]
1473 | struct target_mem_desc *k_tgt = k->tgt;
| ^~~~~
Introducing -Wno-error=unused-variable seems to help, but maybe there is
a better solution?
Kind regards,
Andreas
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-14 9:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 9:22 [Buildroot] NDEBUG breaks compilation of GCC 10 Andreas Ziegler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.