<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Menlo;
        panose-1:2 11 6 9 3 8 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Menlo",sans-serif;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Menlo",sans-serif;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">Isn't PRIuPTR (from inttypes.h) the portable way to print a uintptr_t?<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">On 12/27/17, 10:47 AM, "cfe-commits on behalf of Chandler Carruth via cfe-commits" <cfe-commits-bounces@lists.llvm.org on behalf of cfe-commits@lists.llvm.org> wrote:<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    Author: chandlerc<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    Date: Tue Dec 26 21:46:53 2017<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    New Revision: 321469<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    <o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D321469-26view-3Drev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=MrCL0yxupzyiw5gb5FUuieLYS_IsKGZWx7bEvlEEcIA&s=TtvpLBY95jLHo_IzHMotPEJ5BSh0lIHhmXjuGYj9GcY&e=<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    Log:<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    There is no portable format string for printing `uintptr_t` values.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    Instead, cast them to `void *` which has a portable format string syntax<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    of `%p`.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    <o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    This fixes a -Wformat error when building libunwind.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    <o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    Modified:<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">        libunwind/trunk/src/AddressSpace.hpp<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    <o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    Modified: libunwind/trunk/src/AddressSpace.hpp<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libunwind_trunk_src_AddressSpace.hpp-3Frev-3D321469-26r1-3D321468-26r2-3D321469-26view-3Ddiff&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=MrCL0yxupzyiw5gb5FUuieLYS_IsKGZWx7bEvlEEcIA&s=ek_G7axgNz_LrqBu1RZ3clq1PkTu1FwDkkaFjZFu1T8&e=<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    ==============================================================================<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    --- libunwind/trunk/src/AddressSpace.hpp (original)<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    +++ libunwind/trunk/src/AddressSpace.hpp Tue Dec 26 21:46:53 2017<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    @@ -384,13 +384,13 @@ inline bool LocalAddressSpace::findUnwin<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       // Bare metal is statically linked, so no need to ask the dynamic loader<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       info.dwarf_section_length = (uintptr_t)(&__eh_frame_end - &__eh_frame_start);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       info.dwarf_section =        (uintptr_t)(&__eh_frame_start);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    -  _LIBUNWIND_TRACE_UNWINDING("findUnwindSections: section %X length %x",<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    -                             info.dwarf_section, info.dwarf_section_length);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    +  _LIBUNWIND_TRACE_UNWINDING("findUnwindSections: section %p length %p",<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    +                             (void *)info.dwarf_section, (void *)info.dwarf_section_length);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">     #if defined(_LIBUNWIND_SUPPORT_DWARF_INDEX)<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       info.dwarf_index_section =        (uintptr_t)(&__eh_frame_hdr_start);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       info.dwarf_index_section_length = (uintptr_t)(&__eh_frame_hdr_end - &__eh_frame_hdr_start);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    -  _LIBUNWIND_TRACE_UNWINDING("findUnwindSections: index section %X length %x",<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    -                             info.dwarf_index_section, info.dwarf_index_section_length);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    +  _LIBUNWIND_TRACE_UNWINDING("findUnwindSections: index section %p length %p",<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    +                             (void *)info.dwarf_index_section, (void *)info.dwarf_index_section_length);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">     #endif<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       if (info.dwarf_section_length)<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">         return true;<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    @@ -398,8 +398,8 @@ inline bool LocalAddressSpace::findUnwin<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       // Bare metal is statically linked, so no need to ask the dynamic loader<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       info.arm_section =        (uintptr_t)(&__exidx_start);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       info.arm_section_length = (uintptr_t)(&__exidx_end - &__exidx_start);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    -  _LIBUNWIND_TRACE_UNWINDING("findUnwindSections: section %X length %x",<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    -                             info.arm_section, info.arm_section_length);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    +  _LIBUNWIND_TRACE_UNWINDING("findUnwindSections: section %p length %p",<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    +                             (void *)info.arm_section, (void *)info.arm_section_length);<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">       if (info.arm_section && info.arm_section_length)<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">         return true;<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">     #elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) && defined(_WIN32)<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    <o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    <o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    _______________________________________________<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    cfe-commits mailing list<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    cfe-commits@lists.llvm.org<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dcommits&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=MrCL0yxupzyiw5gb5FUuieLYS_IsKGZWx7bEvlEEcIA&s=lW2e-8AqrhoM9xYXcuGtLKrqsZAff2PFJllWlzitxAc&e=<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Calibri",sans-serif">    <o:p></o:p></span></p>
</div>
</body>
</html>