diff options
author | Gary Benson <gbenson@redhat.com> | 2020-07-20 15:01:04 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2020-07-20 15:01:04 +0100 |
commit | c14b49135568f7fa17a9df19e85a454581617468 (patch) | |
tree | b79f0023808b02c3cd4e90925c6434fbd1255fc1 /gdb/guile | |
parent | 39326c35dd8f1a154cfe15ca640d73873f2df572 (diff) | |
download | gdb-c14b49135568f7fa17a9df19e85a454581617468.zip gdb-c14b49135568f7fa17a9df19e85a454581617468.tar.gz gdb-c14b49135568f7fa17a9df19e85a454581617468.tar.bz2 |
Skip tests requiring "alignof (void)" when compiling using clang
As an extension, GCC allows void pointer arithmetic, with sizeof(void)
and alignof(void) both 1. GDB supports this extension, but clang does
not, and fails to compile the generated output of gdb.cp/align.exp
with the following error:
gdb compile failed, /gdbtest/build/gdb/testsuite/outputs/gdb.cp/align/align.cc:28:23:
error: invalid application of 'alignof' to an incomplete type 'void'
unsigned a_void = alignof (void);
^ ~~~~~~
1 error generated.
This commit adds preprocessor conditionals to the generated output, to
omit the unsupported code when using clang, and supplies the expected
value so the test can complete.
gdb/testsuite/ChangeLog:
* gdb.cp/align.exp: Fix "alignof (void)" tests when compiling
with clang.
Diffstat (limited to 'gdb/guile')
0 files changed, 0 insertions, 0 deletions