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
On Thu, Apr 14, 2005 at 07:19:28PM +0200, Oswald Buddenhagen wrote:
> On Tue, Apr 12, 2005 at 08:28:50PM +0200, Roland Illig wrote:
> > >You can inline it.
> >
> > When compiling with gcc using -Wcast-qual, this would give us a warning
> > for every file.
> >
> ???
> put
> static inline unconst**
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 fast
I have just committed str_unconst().
I will slowly replace the uses of const_cast by str_unconst().
Roland
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel
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 a
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
argum
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, thi
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
> argum
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
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 const_ca
10 matches
Mail list logo