This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: string is const char [] ?


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.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]