Fri Jun 17 00:18:00 GMT 2011
I believe this is the same issue I have been tackling. See
You are right about that this is generic newlib problem. The libstdc++
test you mentioned also fails on ARM due to the same problem.
The patch I sent in that email unfortunately doesn't cover all the
cases, as found out by Jeff Johnston. The patch may work for you if in
OpenRISC 1000 port that _NO_LONGDBL is defined and _MB_CAPABLE is not
I'll put on more information soon.
On 06/16/2011 04:14 PM, Jeremy Bennett wrote:
> I have a problem with swprintf and fixed format output. The following
> code in C++ should cause os2.str () and largebuf to end up with
> identical contents:
> double val2 = numeric_limits<double>::max();
> wostringstream os2;
> os2 << val2;
> swprintf(largebuf, 512, L"%.*f", 3, val2);
> The result should be:
> However, whilst I get this result in os2.str (), in largebuf I get:
> Has anyone seen this with other targets (it is from libstdc++-v3
> regression program
> The problem occurred with the OpenRISC 1000 port of newlib (not part of
> the standard distribution), which is a minimal implementation, offering
> only standard output as a file stream. However this seems to be a
> generic newlib problem, rather than something that is target dependent.
> This is something I would normally report in Bugzilla, but I can't find
> the newlib Bugzilla. If anyone can point me to it, that would be
> Any suggestions welcome.
> Tel: +44 (1590) 610184
> Cell: +44 (7970) 676050
> SkypeID: jeremybennett
> Email: firstname.lastname@example.org
> Web: www.embecosm.com
More information about the Newlib