Axel Bender wrote:
> Compiling gVim 8.1 (latest) on Windows 7 64-bit with MinGW gcc 7.30 64-bit I
> receive the following compiler warning in file undo.c:
>
> gcc -c -Iproto -DWIN32 -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DHAVE_PATHDEF
> -DFEAT_BIG -DHAVE_STDINT_H -DMS_WIN64 -DHAVE_GETTEXT -DHAVE_LOCALE_H
> -DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_MBYTE
> -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -march=x86-64 -Wall
> -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python36.dll\" -O3
> -fomit-frame-pointer -freg-struct-return
> -s undo.c -o objx86-64/undo.o
> undo.c: In function 'u_save_cursor':
> undo.c:270:6: warning: assuming signed overflow does not occur when assuming
> that (X - c) > X is always false [-Wstrict-overflow]
> if (top > curbuf->b_ml.ml_line_count
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> || top >= bot
> ^~~~~~~~~~~~~
There is no subtraction in this code, thus that is a compiler error.
Can we please have a C standard without "undefined behavior"? I want my
code to always behave in a defined way.
--
hundred-and-one symptoms of being an internet addict:
219. Your spouse has his or her lawyer deliver the divorce papers...
via e-mail.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.