On Tue, Apr 12, 2005 at 08:28:50PM +0200, Roland Illig wrote:
Pavel Tsekov wrote:
For those of you that are concerned about the performance loss of an
extra function call: It is much more important for the code to be
readable and checkable by the compiler than to be 1 millisecond faster
at
Oswald Buddenhagen wrote:
whoops, this is exactly what you're talking about. :}
anyway, i don't think this extra warning would matter, given that it
would be in the same location in every file.
and, fwiw, isn't it possible to use a #pragma or some __attribute__ to
get rid of the warning?
There's a
Hi all,
I'd like to introduce a new function:
char *str_unconst(const char *);
The function returns a string that compares equal to its argument, but
does not have the const qualifier. Currently it just returns its
argument, cast to (char *).
I like this version much more than the
Hello,
On Tue, 12 Apr 2005, Roland Illig wrote:
I like this version much more than the const_cast macro I introduced
some months ago. Compare these:
I mean no offense, but please save us all the I like this, I
like that. It's obvious that you check in what you like.
For those of you that
On Tuesday, April 12, 2005 at 12:27, Roland Illig wrote:
Hi!
I'd like to introduce a new function:
char *str_unconst(const char *);
The function returns a string that compares equal to its argument, but
does not have the const qualifier. Currently it just returns its
argument,
Pavel Tsekov wrote:
For those of you that are concerned about the performance loss of an
extra function call: It is much more important for the code to be
readable and checkable by the compiler than to be 1 millisecond faster
at all.
You can inline it.
When compiling with gcc using -Wcast-qual,
Oskar Liljeblad wrote:
On Tuesday, April 12, 2005 at 12:27, Roland Illig wrote:
I'd like to introduce a new function:
char *str_unconst(const char *);
The function returns a string that compares equal to its argument, but
does not have the const qualifier. Currently it just returns its
On Tuesday, April 12, 2005 at 20:16, Roland Illig wrote:
char *str_unconst(const char *);
[..]
In what way is this function (or macro) useful? It seems to break the
whole point with 'const' in C. If something is const, you shouldn't
touch it. Or should you?
We are using SLang and Samba,