bug-grep
[Top][All Lists]
Advanced

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

Re: [bug-grep] PARAMS, gnulib update and const


From: Claudio Fontana
Subject: Re: [bug-grep] PARAMS, gnulib update and const
Date: Tue, 22 Mar 2005 02:00:46 +0100 (CET)

Sorry, forgot to cc bug-grep.
Here are my 2c again (Sorry Paul for the redundancy).

> Can you give some sample violations in the GNU
> grep source code?

grep.c:552: warning: assignment discards qualifiers
from pointer target type
search.c:178: warning: passing arg 1 of `wcrtomb'
discards qualifiers from pointer target type
 
I think I have seen other less evident problems, but I
might be mistaken.

> One problem with "const" that is inherent to the
> current C design is
> prototypes like this:
> 
>    char *strchr (char const *str, int ch);
> 
> The implementation of strchr must cast "char const
> *" to "char *", and
> this is a botch in C.
 
Yes, this is a well known thing.
 
Since const is in the library and in the standard[s]
(and in many libraries' interfaces), it will be
around and we must deal with it. I just try to keep
interaction to a minimum personally.
 
In my exp (intensive, but very solitary and personal,
so your mileage may vary), const never brought me
anything at the end of the day (and got poisoned
often), so I threw the baggage.
 



                
___________________________________ 
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, 
Giochi, Rubrica… Scaricalo ora! 
http://it.messenger.yahoo.it




reply via email to

[Prev in Thread] Current Thread [Next in Thread]