> Another solution might be to change (lvalue == const) comparisons to
> (const == lvalue) ones, so that an accidental (malicious?) '=' in place
> of '==' is caught by the compiler.
>
> I've made it my coding style after the incident.
gcc warns about this construct unless you put in extra braces. I don't
see how the const == lvalue coding style buys you anything more than
the braces do, at least in terms of doing this accidentally.
Duncan.
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
|