Boost C++ Libraries: Ticket #7019: In libs/format/test/format_test3.cpp, 64-bit Solaris stlport4 iostream produces different result for stlport4 https://svn.boost.org/trac10/ticket/7019 <p> On Solaris for both SPARC and x86, building the following on Sun Studio with "CC -m64" will produce 8 digits (ffffffff), and building with "CC -m64 -library=stlport4" will produce 16 digits (ffffffffffffffff). </p> <p> #include &lt;iostream&gt; </p> <p> int main() { </p> <blockquote> <p> std::cout &lt;&lt; std::hex &lt;&lt; -1 &lt;&lt; std::endl; </p> </blockquote> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> <p> This difference in behavior causes format_test3 on 64-bit STLPort4 Solaris builds to fail the nesting test. </p> <p> The attached patch matches actual output in this situation. Not sure if pattern needs to be changed to demonstrate nesting for the 16 character case. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7019 Trac 1.4.3 Mike Liang <mtliang@…> Fri, 22 Jun 2012 21:28:46 GMT attachment set https://svn.boost.org/trac10/ticket/7019 https://svn.boost.org/trac10/ticket/7019 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">format_test3.cpp.patch</span> </li> </ul> Ticket Mike Liang <mtliang@…> Fri, 22 Jun 2012 21:30:09 GMT component changed; owner set https://svn.boost.org/trac10/ticket/7019#comment:1 https://svn.boost.org/trac10/ticket/7019#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Samuel Krempp</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">format</span> </li> </ul> Ticket James E. King, III Sat, 14 Oct 2017 12:49:05 GMT owner, status changed https://svn.boost.org/trac10/ticket/7019#comment:2 https://svn.boost.org/trac10/ticket/7019#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Samuel Krempp</span> to <span class="trac-author">James E. King, III</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket James E. King, III Sat, 14 Oct 2017 12:49:23 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7019#comment:3 https://svn.boost.org/trac10/ticket/7019#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> I'm going to assume this is still an issue, given that in <span class="underline">LP64</span> mode a long is 8 bytes. Here's the problem I have with the code and the patch: </p> <ol><li>The format value is "x" which means integer. </li><li>The value being inserted is -100 without decorations, so it should be treated as an integer. </li></ol><p> Neither of these are long, which leads me to believe the submitted patch is a band-aid and not fixing the root cause. Furthermore, the boost project does not have a sunpro regression test in the matrix (<a href="http://www.boost.org/development/tests/develop/developer/format.html">http://www.boost.org/development/tests/develop/developer/format.html</a>). I don't have an environment to debug this in either. </p> <p> Further, the example you put into your description appears non-conformant to the standard. The value -1 is an integer, not a long integer. Even with stlsoft, _STLSOFT_SIZEOF_INT is always 4 even if _LP64 mode is on. (see: stlsoft-1.9.124 headers, include/stlsort/internal/cccap/sunpro.h). Given the failure occurs when stlsoft is added, my guess is stlsoft is to blame. </p> <p> I am going to close this issue as wontfix since the environment is not conforming to the language rules. </p> Ticket