Looser alignment checks. Closes #58.

pull/59/head
Jussi Pakkanen 10 years ago
parent 40e8e203d5
commit 78d31cafd7
  1. 13
      test cases/common/45 alignment/meson.build

@ -11,13 +11,18 @@ endif
ptr_size = cc.sizeof('void*')
dbl_alignment = cc.alignment('double')
if host.name() == 'windows'
dbl_exp = 8
# These tests are not thorough. Doing this properly
# would take a lot of work because it is strongly
# platform and compiler dependent. So just check
# that they produce something fairly sane.
if ptr_size == 8 or ptr_size == 4
message('Size of ptr ok.')
else
dbl_exp = ptr_size
error('Size of ptr misdetected.')
endif
if dbl_alignment == dbl_exp
if dbl_alignment == 8 or dbl_alignment == 4
message('Alignment of double ok.')
else
error('Alignment of double misdetected.')

Loading…
Cancel
Save