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]
Other format: [Raw text]

Re: Removing -frwitable-strings


On Dec 19, 2003, at 12:42 PM, Joseph S. Myers wrote:

On Fri, 19 Dec 2003, Syd Polk wrote:

Make -Wwrite-strings on by default. Otherwise, people who port to gcc

The trouble is, it warns for a great deal of reasonably clean
standards-conforming code, and the changes required to fix those warnings
are more wide-ranging than for -Wall (which it might be more reasonable to
enable by default). In rare cases it may also *remove* diagnostics
required by the standard as a side effect of giving string literals a
different type from that the C standard requires.

At the risk of getting boring by repeating myself... This might be an
argument for treating C and C++ differently. The two languages have
different rules about the types of string literals, and it's a lot harder to
call 'char* p = "foo"' clean code in C++ than it is in C.


--Matt


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