This is the mail archive of the gcc-patches@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: cpplib and a couple others: squelch -pedantic warnings


Mark Mitchell <mark@codesourcery.com> writes:

| >>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
| 
|     Kaveh> How about providing a cfree() function which does the
|     Kaveh> following:
| 
| I think that's a dangerous subversion of the type system.  Then,
| `cfree ("abc")' will compile, which is dangerous.

Agreed in principle.  I just realized that cfree() only solves half of 
the problem.  There are other places where we need to cast away
constness.  Just de-constifying everything isn't really acceptable,
and [cx]free is just half a solution.  Do we really need -Wcast-qual for 
GCC?  How useful is it?

-- Gaby
CodeSourcery, LLC		http://www.codesourcery.com

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