public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] Only ignore -Wenum-compare-switch if it exists Date: Sun, 31 Dec 2017 04:57:00 -0000 [thread overview] Message-ID: <cfa27c399ec9236a100ef794505d35f60da41a6d@gdb-build> (raw) *** TEST RESULTS FOR COMMIT cfa27c399ec9236a100ef794505d35f60da41a6d *** Author: Simon Marchi <simon.marchi@ericsson.com> Branch: master Commit: cfa27c399ec9236a100ef794505d35f60da41a6d Only ignore -Wenum-compare-switch if it exists My patch dwarf2read: Silence -Wenum-compare-switch warning 132448f8359a268f34f074b0908b5255b568da06 made some parts of dwarf2read.c ignore warnings about switch using enums of different kinds. What I did not realize was that older Clang versions (prior to 6) did not have that warning, and therefore give this error: /home/emaisin/src/binutils-gdb/gdb/dwarf2read.c:24187:7: error: unknown warning group '-Wenum-compare-switch', ignored [-Werror,-Wunknown-pragmas] DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES ^ /home/emaisin/src/binutils-gdb/gdb/common/diagnostics.h:42:3: note: expanded from macro 'DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES' DIAGNOSTIC_IGNORE ("-Wenum-compare-switch") ^ /home/emaisin/src/binutils-gdb/gdb/common/diagnostics.h:27:3: note: expanded from macro 'DIAGNOSTIC_IGNORE' _Pragma (STRINGIFY (GCC diagnostic ignored option)) ^ <scratch space>:10:25: note: expanded from here GCC diagnostic ignored "-Wenum-compare-switch" ^ Clang has a way to test if it knows about a particular warning. This patch uses that feature to only define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES to something if the warning is recognized by the Clang version being used. I tested building dwarf2read.c with clang 4, 5, 6, as well as gcc. gdb/ChangeLog: * common/diagnostics.h (DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES): Only define if the compiler knows about -Wenum-compare-switch.
next reply other threads:[~2017-12-31 4:57 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-12-31 4:57 sergiodj+buildbot [this message] 2017-12-31 4:57 ` Failures on Fedora-x86_64-native-gdbserver-m32, branch master sergiodj+buildbot 2017-12-31 5:11 ` Failures on Fedora-i686, " sergiodj+buildbot 2017-12-31 5:20 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot 2017-12-31 5:36 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot 2017-12-31 5:38 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot 2017-12-31 5:54 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot 2017-12-31 6:02 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, " sergiodj+buildbot 2017-12-31 6:09 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot 2017-12-31 6:25 ` Failures on Ubuntu-AArch32-m32, " sergiodj+buildbot 2017-12-31 6:34 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot 2017-12-31 7:37 ` Failures on Ubuntu-AArch64-m64, " sergiodj+buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cfa27c399ec9236a100ef794505d35f60da41a6d@gdb-build \ --to=sergiodj+buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).