aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2020-06-24 23:18:19 +0100
committerPedro Alves <palves@redhat.com>2020-06-24 23:18:19 +0100
commit331733cd4e2f2fe76c0b7b6fdd81e54724572354 (patch)
tree4a86f24cb20610f3934dcac2409a1cd5a049b11e /gas
parenta8654e7d784980cb4596f685964200fcc1164c78 (diff)
downloadgdb-331733cd4e2f2fe76c0b7b6fdd81e54724572354.zip
gdb-331733cd4e2f2fe76c0b7b6fdd81e54724572354.tar.gz
gdb-331733cd4e2f2fe76c0b7b6fdd81e54724572354.tar.bz2
W/ Clang, compile C/C++ testcases with -Wno-unknown-warning-option
Some C/C++ testcases unconditionally pass -Wno-foo as additional options to disable some warning. That is OK with GCC, because GCC accepts -Wno-foo silently even if it doesn't support -Wfoo. This is a feature which allows disabling warnings with newer compilers without breaking builds with older compilers. Clang however warns about unknown -Wno-foo by default, unless you pass -Wno-unknown-warning-option as well: $ gcc -Wno-foo test.c * nothing, compiles successfuly * $ clang -Wno-foo test.c warning: unknown warning option '-Wno-foo [-Wunknown-warning-option] This commit adds -Wunknown-warning-option centrally in gdb_compile, so that individual testcases don't have to worry about breaking older Clangs. IOW, this avoids this problematic scenario: #1 - A testcase compiles successfully with Clang version X. #2 - Clang version "X + 1" adds a new warning, enabled by default, which breaks the test. #3 - We add -Wno-newwarning to the testcase, fixing the testcase with clang "X + 1". #4 - Now building the test with Clang version X no longer works, due to "unknown warning option". gdb/testsuite/ChangeLog: 2020-06-24 Pedro Alves <palves@redhat.com> * lib/gdb.exp (gdb_compile): Update intro comment. If C/C++ with Clang, add "-Wno-unknown-warning-option" to the options.
Diffstat (limited to 'gas')
0 files changed, 0 insertions, 0 deletions