Re: sc_cast_of_argument_to_free

2009-04-03 Thread Jim Meyering
Reuben Thomas wrote: > Why is this rule valid? GCC gives warnings if const pointers are not > cast to non-const before passing to C. As far as I can see, this is > correct: free takes a non-const argument. > Should malloced memory > simply not be assigned to a const pointer? Right. In the scope t

sc_cast_of_argument_to_free

2009-04-03 Thread Reuben Thomas
Why is this rule valid? GCC gives warnings if const pointers are not cast to non-const before passing to C. As far as I can see, this is correct: free takes a non-const argument. Should malloced memory simply not be assigned to a const pointer? -- http://rrt.sc3d.org/ | Bathe or shower daily: