| Summary: | printf %hhd is broken | ||
|---|---|---|---|
| Product: | uClibc | Reporter: | Michael Deutschmann <michael> |
| Component: | stdio | Assignee: | Carmelo Amoroso <carmelo.amoroso> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | uclibc-cvs |
| Priority: | P5 | ||
| Version: | 0.9.31 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | Patch to fix printf hhd conversion | ||
Thanks Michael, please next time try to use git to format patch. Applied on master. Thanks uClibc 0.9.32 doesn't contain this fix. The old patch still applies. |
Created attachment 1753 [details] Patch to fix printf hhd conversion The %hhd printf conversion is treated identically to %hhu. This causes "255" to be output instead of "-1". This misbehavior causes a spurious test failure in the MPFR library. This is a regression from 0.9.30.3, but the change that caused the problem isn't actually in the stdio files. It happens because uClibc is now built with -funsigned-char. Attached is a fix that changes a critical cast from "(char)" to "(signed char)", restoring the original semantics.