This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: string is const char [] ?
- To: egcs at cygnus dot com
- Subject: Re: string is const char [] ?
- From: Oleg Zabluda <zabluda at math dot psu dot edu>
- Date: Fri, 26 Jun 1998 00:47:42 -0400 (EDT)
In article <199806251626.SAA05600@jolan.ppro> you wrote:
: | Here is a real bug in egcs:
: |
: | void f( char *) {}
: | voif f(const char *) {}
: |
: | f("test not const"); // error in egcs. f(const char *) must be called,
: | // because the type of string literals now is
: | // array of n const char. However egcs calls
: | // f(char*). -Wwrite-strings has no effect.
: | // And even warning is surpressed.
: Shouldn't this be added as a test in the testsuite?
I think it should. I am sorry for not submitting a patch at this
time. I'll setup everything needed for generating good patches
Real Soon Now. I've posted this hoping somebody else would.
Oleg.
--
Life is a sexually transmitted, 100% lethal disease.