DragonFly submit List (threaded) for 2007-09
DragonFly BSD
DragonFly submit List (threaded) for 2007-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [PATCH] Make lconv structure conform to standards


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Tue, 18 Sep 2007 13:29:08 +0200
Mail-followup-to: submit@crater.dragonflybsd.org

On Mon, Sep 17, 2007 at 04:36:37PM +0300, Hasso Tepper wrote:
> Unconstify members of the lconv structure to make it conform to the C89
> and C99 standards. At the moment the code snippets like this will compile
> without warning on every platform I looked at except DragonFly:
> 
> 	char *foo = lconv->thousands_sep;

Yes and this code is wrong because it can though read-only memory. I
never saw a technical reason why this fields are not read-only in ISO C
and that is bogus.

Joerg



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]