warnings from the compiler

477 views
Skip to first unread message

tooth pik

unread,
Dec 20, 2021, 11:43:33 AM12/20/21
to vim...@googlegroups.com
am i supposed to be getting (and ignoring?) a warning on make
that _FORIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]

Tony Mechelynck

unread,
Dec 20, 2021, 1:24:57 PM12/20/21
to Bram Moolenaar, vim_dev
On Mon, Dec 20, 2021 at 5:43 PM tooth pik <toot...@gmail.com> wrote:
>
> am i supposed to be getting (and ignoring?) a warning on make
> that _FORIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
>

I confirm that after applying patches 3857 to 3861, the compile step
for every single module in all five featuresets gives the same
warning, for instance in Tiny src/version.c :

gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -Wall -Wextra -Wshadow
-Wmissing-prototypes -Wunreachable-code -Wno-deprecated-declarations
-D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DEXITFREE
-DABORT_ON_INTERNAL_ERROR version.c -o objects/version.o
In file included from /usr/include/bits/libc-header-start.h:33:0,
from /usr/include/limits.h:26,
from
/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed/limits.h:194,
from
/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed/syslimits.h:7,
from
/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed/limits.h:34,
from vim.h:78,
from version.c:10:
/usr/include/features.h:397:4: warning: #warning _FORTIFY_SOURCE
requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^~~~~~~

Best regards,
Tony.

Bram Moolenaar

unread,
Dec 20, 2021, 4:36:40 PM12/20/21
to vim...@googlegroups.com, Tony Mechelynck
This must be a recent change on your system. My /usr/include/features.h
does not have this line.

We could probably add a configure check, but when changing the compile
options later it would do the wrong thing. You would have to run
configure every time if you change the optimization.

Is there a way to disable this warning?

--
hundred-and-one symptoms of being an internet addict:
91. It's Saturday afternoon in the middle of May and you
are on computer.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Tony Mechelynck

unread,
Dec 20, 2021, 4:58:49 PM12/20/21
to Bram Moolenaar, vim_dev
My /usr/include/features.h is dated 24 November and since then, I have
compiled Vim several times without getting this warning.

The gcc line looks weirdly different from what it used to. Has there
been a recent change in the src/Makefile ?

I'm going to try "make reconfig" but with little hope.

Best regards,
Tony.

Tony Mechelynck

unread,
Dec 20, 2021, 5:02:01 PM12/20/21
to Bram Moolenaar, vim_dev
...No change.

Best regards,
Tony.

Bram Moolenaar

unread,
Dec 20, 2021, 5:14:14 PM12/20/21
to vim...@googlegroups.com, Tony Mechelynck
Sorry, patch 8.2.3860 indeed included changes to src/Makefile that
should not be there. Hidden halfway a very large patch...

--
From "know your smileys":
y:-) Bad toupee
Reply all
Reply to author
Forward
0 new messages