This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
warning: passing `char' to argument 2 of `strcpy(char *, const char *)' lacks a cast
- To: egcs at cygnus dot com
- Subject: warning: passing `char' to argument 2 of `strcpy(char *, const char *)' lacks a cast
- From: Olivier Galibert <Olivier dot Galibert at mines dot u-nancy dot fr>
- Date: Sat, 11 Oct 1997 07:54:07 +0200
Shouldn't these warnings being errors instead ? I see no case where
it can be something else than a typo and in a big compilation a
meaningful warning can go unnoticed within meaningless ones.
renaissance.loria.fr:~/dvp/gally/magna #437 >cat >blah.cc
#include <string.h>
int main()
{
char tab[5];
strcpy(tab, 'a');
return 0;
}
renaissance.loria.fr:~/dvp/gally/magna #438 >g++ blah.cc -o blah
blah.cc: In function `int main()':
blah.cc:6: warning: passing `char' to argument 2 of `strcpy(char *, const char *)' lacks a cast
renaissance.loria.fr:~/dvp/gally/magna #439 >gcc blah.cc -o blah
blah.cc: In function `int main()':
blah.cc:6: warning: passing `char' to argument 2 of `strcpy(char *, const char *)' lacks a cast
renaissance.loria.fr:~/dvp/gally/magna #440 >gcc -v
Reading specs from /users/model/galibert/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.12/specs
gcc version egcs-2.90.12 971008 (gcc2-970802 experimental)
OG.