Today I upgrade my computer to ubuntu 11.04. then I started to compile vim.

when compiling, it shows many warnings for strcpy() in eval.c.

gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread 
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ 
-I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 
-I/usr/lib/gtk-2.0/include -I/usr/include/cairo 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1     -O2 -g 
-march=native -mfpmath=sse -DNDEBUG -fno-strength-reduce        -o 
objects/eval.o eval.c
In file included from /usr/include/string.h:642:0,
                 from os_unix.h:515,
                 from vim.h:270,
                 from eval.c:14:
In function ‘strcpy’,
    inlined from ‘call_user_func’ at eval.c:21945:2:
/usr/include/bits/string3.h:105:3: warning: call to __builtin___strcpy_chk 
will always overflow destination buffer


These are warnings but it always crashes vim on start-up.

Add -D_FORTIFY_SOURCE=1 to CFLAGS solves the problem. But vim does work 
without FORTIFY_SOURCE in ubuntu 10.10 and before.  IMO -D_FORTIFY_SOURCE=1 
is not an option which should be used on final product program.

Any hints? thanks.

-- 
You received this message from the "vim_use" 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

Reply via email to