Run ./configure with the following flags:
--with-x
--enable-gui=gtk3
--x-includes=/usr/include/x86_64-linux-gnu
--x-libraries=/lib/x86_64-linux-gnu
--disable-netbeans
--disable-nls
Then do make -j4
.
Observe the following warning that wasn't there a couple of days ago:
eval.c: In function ‘echo_string_core’:
cc1: warning: function may return address of local variable [-Wreturn-local-addr]
eval.c:5741:17: note: declared here
5741 | char_u buf[MAX_FUNC_NAME_LEN];
| ^~~
I expect that no warnings are emitted during the make
phase.
9.1.444
OS: Linux Mint 21.1
Shell: Bash
Terminal: Kitty
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I noticed this to with gcc-10. I stared at it for a while and couldn't make sense of it. It only seems to occur when compiling with -O2
(which is unfortunately the default). I suspect a false positive here, because it doesn't appear when compiling with -O
(or when compiling with clang
) and the code seems correct. However I am not sure if the optimizer optimizes the code wrongly and then the warning is justified (and this is an actual issue with the optimized code). So I am not sure what to do against it.
It's the reason I commited 95ff39f to make sure coverity still works.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
BTW: what gcc version are you using? I see it with gcc-10 on my default Debian bulleye work-station. On a bookworm with gcc-13, I don't see this warning.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I don't see it with gcc-13
. and gcc-12
. Seems an issue with gcc-10
and gcc-11
then. Does the workaround of export CFLAGS=-O
and then configure, make
work for you?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
That workaround does seem to prevent the warning. I'm not sure whether I should use that workaround; without the workaround and with the warning, vim ends up compiling anyway.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Closed #14847 as completed via 8904d67.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.