On 16-07-2007 15:22:27 +0200, Sjoerd Mullender wrote:
> > This is actually pretty useless.  You've declared val as a const, not
> > what val point to (i.e. the chars that make up the string).
> > Consider this:
> > 
> > typedef char *str;
> > void foo(const str x)
> > {
> >     *x = 0;
> > }
> > 
> > this is valid code and will be accepted by both gcc and icc, but this is
> > exactly what you try to prevent from happening when you declare a
> > parameter const char *.  In other words, val should be declared as const
> > char *val, and then you shouldn't need the case when calling the function.
> 
> s/case/cast/

I didn't realise a typedef is really something different for the
compiler.  Thanks for the info.  I reverted my check-in and solved it
via an intermediate buffer.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers

Reply via email to