Skip to content

Commit a8d5565

Browse files
authored
Avoid compile error on test_aligned_alloc (#15024)
A recent commit taught clang that the first parameter to aligned_alloc should be a power of two alignment, and since then clang emits a warning (which we upgrade to an error) when that argument is a constant that is not a power of two. Since the test actually wants to test the function behavior in that case, ignore the error.
1 parent e8f25f8 commit a8d5565

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,8 @@ def test_align64(self):
581581

582582
@no_asan('asan errors on corner cases we check')
583583
def test_aligned_alloc(self):
584-
self.do_runf(test_file('test_aligned_alloc.c'), '')
584+
self.do_runf(test_file('test_aligned_alloc.c'), '',
585+
emcc_args=['-Wno-non-power-of-two-alignment'])
585586

586587
def test_unsigned(self):
587588
src = '''

0 commit comments

Comments
 (0)