diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2018-02-09 10:27:18 -0600 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2018-02-10 03:19:26 +0100 |
commit | 555e15ebe8bf1eb33d00747173cfc80cc65648a4 (patch) | |
tree | 6aa9cca6e04514cbc45d88f96a873cc6a4767472 /backends/sparc_retval.c | |
parent | 240a068fcf3eb6bbcda525f80c8778de62621d9e (diff) | |
download | elfutils-555e15ebe8bf1eb33d00747173cfc80cc65648a4.tar.gz |
Use fallthrough attribute.
Use __attribute__ ((fallthrough)) to indicate switch case fall through
instead of a comment. This ensures that the fallthrough warning is not
triggered even if the file is pre-processed (hence stripping the
comments) before it is compiled.
The actual fallback implementation is hidden behind a FALLBACK macro in
case the compiler doesn't support it.
Finally, the -Wimplict-fallthrough warning was upgraded to only allow
the attribute to satisfy it; a comment alone is no longer sufficient.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Diffstat (limited to 'backends/sparc_retval.c')
-rw-r--r-- | backends/sparc_retval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/sparc_retval.c b/backends/sparc_retval.c index e1b17753..fb81cdce 100644 --- a/backends/sparc_retval.c +++ b/backends/sparc_retval.c @@ -91,7 +91,7 @@ sparc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: |