On 9/4/07, Andy Ross <[EMAIL PROTECTED]> wrote:
> John Denker wrote:
> > 2) It seems vacuous to compare writing via a const char* to
> > writing via a non-const char*, because AFAIK there is no such
> > thing as writing via a const char*.  No compiler AFAIK will
> > generate any CPU instructions for it.
>
> Oh, good grief:
>
>   $ echo 'void foo(const char* p){*(char*)p=0;}' > tmp.c
>   $ gcc -S -c -o - tmp.c
>
> Look!  Instructions!

I could be wrong, but I think you missed his point. I don't think he
was arguing that you couldn't cast a const char* to a char*. The
argument was that without the cast it doesn't work, and the cast is
bad form and leads to bugs. I think it's a reasonable argument, not
one that needs derision.

-- 
Hans Fugal
Fugal Computing

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to