This is the best solution I have heard thus far. This is the path we have always taken on our embedded platforms as well.<br><br><div><span class="gmail_quote">On 12/1/05, <b class="gmail_sendername">Rob Landley</b> <<a href="mailto:rob@landley.net">
rob@landley.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Wednesday 30 November 2005 17:41, Chuck Meade wrote:
<br>> Yeah that one can't be warned against by the compiler. It is just an<br>> error -- assuming the user wasn't purposely aiming for this behavior.<br>><br>> In other words, if they wrote the above code using a signed char,
<br>> and did not handle (or prevent) the case where the MSB would get set,<br>> and they are surprised when the comparison gives unexpected results,<br>> then the error is on their part.<br><br>Ok, so some of the most common _real_ errors aren't caught by this stupid
<br>warning (and can't be), so even herculean efforts to clean up the noise<br>wouldn't actually be _useful_.<br><br>But what _might_ be useful is -funsigned-char added to our makefile. (The<br>argument about this producing more or less efficient code still sounds like
<br>handwaving at this point. I'm more concerned about whether or not our code<br>is _right_. We declare unsigned char in a lot of places already, if that<br>affected the binary size I think we would have noticed by now. As for
<br>efficiency, either the library has assembly optimized versions of strcmp()<br>and friends, or it doesn't.)<br><br>*rummage* *rummage*...<br><br>I just set EXTRA_CFLAGS_OPTIONS to -funsigned-char and did a "make clean &&
<br>make" and it seems to have built (on ubuntu with gcc 3.3) just fine. I'll<br>try it on gcc 4.0 in a bit and see if it makes a difference to the darn<br>warnings, and if so I'll patch Rules.mak and check it in to see what breaks
<br>for other people.<br><br>I'm going to try to put together a -pre2 for release wednesday the 7th. It<br>probably won't have all the bugs from the list fixed, but I hope to at least<br>have 'em triaged into "must fix for
1.1", "would be nice", and "not a 1.1<br>issue."<br><br>> Chuck<br><br>Rob<br>--<br>Steve Ballmer: Innovation! Inigo Montoya: You keep using that word.<br>I do not think it means what you think it means.
<br>_______________________________________________<br>busybox mailing list<br><a href="mailto:busybox@busybox.net">busybox@busybox.net</a><br><a href="http://busybox.net/cgi-bin/mailman/listinfo/busybox">http://busybox.net/cgi-bin/mailman/listinfo/busybox
</a><br></blockquote></div><br>