mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Enable strict-aliasing and implicit-fallthrough warnings
GCC needs to have the comment *right before* the case label... blergh
This commit is contained in:
parent
4e8c0f757d
commit
005d3a5981
@ -39,6 +39,7 @@ if (CMAKE_GENERATOR STREQUAL "Ninja" AND
|
|||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Enable a whole bunch of warnings, but turn off:
|
# Enable a whole bunch of warnings, but turn off:
|
||||||
# - implicit fallthrough because that does not recognize some cases where it's desired (and I *really* want this one!)
|
# - implicit fallthrough because that does not recognize some cases where it's desired (and I *really* want this one!)
|
||||||
# - comment because we use a bunch of those, and they're not really all that harmful.
|
# - comment because we use a bunch of those, and they're not really all that harmful.
|
||||||
@ -46,10 +47,8 @@ endif()
|
|||||||
# - strict-aliasing, because on old GCCs (*Travis*) those are triggered by maybe.h, so you get it every time it is included.
|
# - strict-aliasing, because on old GCCs (*Travis*) those are triggered by maybe.h, so you get it every time it is included.
|
||||||
# - redundant-move, because we have one that is required on old libc
|
# - redundant-move, because we have one that is required on old libc
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra \
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra \
|
||||||
-Wno-implicit-fallthrough \
|
|
||||||
-Wno-comment \
|
-Wno-comment \
|
||||||
-Wno-address \
|
-Wno-address \
|
||||||
-Wno-strict-aliasing \
|
|
||||||
")
|
")
|
||||||
|
|
||||||
# Disable exception handling.
|
# Disable exception handling.
|
||||||
|
@ -2941,9 +2941,9 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
|
|||||||
parser().libdata().is_repaint = false;
|
parser().libdata().is_repaint = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Else we repaint as normal.
|
// Else we repaint as normal
|
||||||
/* fallthrough */
|
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case rl::force_repaint:
|
case rl::force_repaint:
|
||||||
case rl::repaint: {
|
case rl::repaint: {
|
||||||
parser().libdata().is_repaint = true;
|
parser().libdata().is_repaint = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user