On Tue, Jun 05, 2007 at 09:41:47AM -0400, James Carlson wrote: > (To be fair at this, the compiler _should_ have given a warning or > error for your code, because you're initializing a 'char *' pointer > from a 'const char *' pointer. Discarding 'const' without an explicit > cast is a programming error.)
gcc will do so if -Wwrite-strings is given. Unfortunately, this warning option is less useful than one might hope because most structures in the system headers do not specify const on their string members even though the library functions that manipulate those pointers do not modify the regions they point to. The result for any nontrivial program is a flood of impossible-to-fix and impossible-to-squelch false positives. -- Keith M Wesolowski "Sir, we're surrounded!" FishWorks "Excellent; we can attack in any direction!" _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
