Justin M. Keyes
45f25f7e0b
build: PRAGMA_DIAG_PUSH_IGNORE_MISSING_PROTOTYPES
...
On Travis CI, -Wmissing-prototypes gives strange error:
In file included from ../src/nvim/eval.c:5965:
/home/travis/build/neovim/neovim/build/src/nvim/auto/funcs.generated.h.gperf:215:1: error: conflicting types for 'find_internal_func_gperf'
find_internal_func_gperf (register const char *str, register unsigned int len)
^
../src/nvim/eval.c:5962:20: note: previous declaration is here
const VimLFuncDef *find_internal_func_gperf(register const char *str,
^
2019-02-04 13:16:59 +01:00
Justin M. Keyes
bfb8170d32
PVS/V1028 (rework): cast operands, not the result #9531
...
closes #9522
2019-01-21 23:49:58 +01:00
Justin M. Keyes
c11b79ce51
STRICT_ADD, STRICT_SUB: Log error before abort
2019-01-20 00:18:39 +01:00
Justin M. Keyes
dbba685c69
build: include auto/config.h explicitly
...
Otherwise the symbols defined in config/config.h.in may not be defined,
depending on include-order.
2019-01-20 00:18:39 +01:00
Justin M. Keyes
fc4ca5bdd8
CMake: Feature-detect __builtin_{add,sub}_overflow
2019-01-09 10:41:17 +01:00
Justin M. Keyes
596f020e90
PVS/V1028: cast operands, not the result
2019-01-09 10:41:17 +01:00
Justin M. Keyes
6b6a4d63ec
assert.h: Check overflow with STRICT_ADD, STRICT_SUB
2019-01-09 10:41:17 +01:00
Björn Linse
1a194fad22
Fix warnings with gcc 6.1
...
The intentional behavior of do_sub was checked in vim
2016-05-19 20:53:04 +02:00
Rui Abreu Ferreira
2a8ceb160c
MSVC: Avoid variadic macro bug in STATIC_ASSERT
...
MSVC does not handle __VA_ARGS__ as expected in STATIC_ASSERT, avoid its use
to work around it since we don't need it. The underlying issue seems to be one
of
https://connect.microsoft.com/VisualStudio/Feedback/Details/1232378
https://connect.microsoft.com/VisualStudio/Feedback/Details/1099052
The bug only seems to manifest when using multiple variadic macros that call
each other.
2016-04-30 20:31:02 +01:00
ZyX
6a35f2ac8b
eval: Do not break when VimVarIndex and vimvars order mismatches
...
Also makes sure that compiler will error out when new name is longer then
vv_filler.
2016-04-18 02:48:20 +03:00
Nicolas Hillegeer
095b4479c0
assert: add STATIC_ASSERT macro
...
Can be quite handy, attempt to provide fallbacks for compilers that don't
support _Static_assert (which is technically a C11 feature). Suppress
warnings as best we can (Clang and GCC warn that we're using a C11 feature
while in C99 mode).
Needs to be tested for MSVC still.
2014-07-16 17:12:34 +02:00