Boost C++ Libraries: Ticket #775: Warnings on MSVC 2005 https://svn.boost.org/trac10/ticket/775 <pre class="wiki">I've found that when using Boost on Microsoft Visual Studio C++ 2005, I get warning C4103 when including any boost header which end up including: abi_{prefix,suffix}.hpp (eg. iostreams/filter/zlib.hpp) or which manually performs a #include BOOST_ABI_{PREFIX,SUFFIX} (eg. regex/v4/regex_traits_defaults.hpp). An explanation for the warning can be found here: http://windowssdk.msdn.microsoft.com/en-us/library/t4d0762d.aspx What is happening is that config/abi/msvc_{prefix,suffix}.hpp performs "#pragma pack(push,8)" (in msvc_prefix.hpp) and then performs a "#pragma pack(pop)" (in msvc_suffix.hpp). This leads the compiler to think that the packing alignment has erroneously changed, generating unnecessary warnings. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/775 Trac 1.4.3 René Rivera Mon, 21 May 2007 15:37:31 GMT component, description changed; severity set https://svn.boost.org/trac10/ticket/775#comment:1 https://svn.boost.org/trac10/ticket/775#comment:1 <ul> <li><strong>component</strong> <span class="trac-field-old">build</span> → <span class="trac-field-new">config</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/775?action=diff&amp;version=1">diff</a>) </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket John Maddock Thu, 23 Aug 2007 09:07:58 GMT status, resolution changed https://svn.boost.org/trac10/ticket/775#comment:2 https://svn.boost.org/trac10/ticket/775#comment:2 <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-old">None</span> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in SVN. </p> Ticket ryan.gallagher@… Fri, 21 Dec 2007 03:29:40 GMT <link>https://svn.boost.org/trac10/ticket/775#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/775#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/775#comment:2" title="Comment 2">johnmaddock</a>: </p> <blockquote class="citation"> <p> Fixed in SVN. </p> </blockquote> <p> Where/how was this fixed? I'm looking at boost/filesystem/convenience.hpp in svn trunk and don't see a fix for at least this instance of it. Perhaps I missed how you fixed it, or was it in a different branch? </p> <p> I have a patch at least for several instances of this if you'd like it. I'll attach it. </p> </description> <category>Ticket</category> </item> <item> <author>ryan.gallagher@…</author> <pubDate>Fri, 21 Dec 2007 03:30:33 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/775 https://svn.boost.org/trac10/ticket/775 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-1.34.1-warningfixes.patch</span> </li> </ul> <p> patch for several msvc 4103 warnings </p> Ticket mstevens@… Wed, 29 Oct 2008 16:59:09 GMT <link>https://svn.boost.org/trac10/ticket/775#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/775#comment:4</guid> <description> <p> This is not fixed for the following files </p> <p> *boost/system/error_code.hpp *boost/filesystem/path.hpp *boost/filesystem/operations.hpp </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Wed, 29 Oct 2008 17:06:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/775#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/775#comment:5</guid> <description> <p> Please note that abi_prefix.hpp has recently been changed, so this warning will no longer occur on Win64 builds with the default alignment settings. Also when this came up on the mailing list recently, we decided to deliberately leave the warnings in place should the user choose to change the default alignment settings. </p> <p> Leaving closed for now. </p> <p> John Maddock. </p> </description> <category>Ticket</category> </item> <item> <author>mstevens@…</author> <pubDate>Wed, 29 Oct 2008 17:12:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/775#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/775#comment:6</guid> <description> <p> Thanks John, </p> <p> With Boost 1.36.0 was getting the 4103 compiler warning compiling in 64-bit mode on MSVC 2008 (9.0). I silenced the warnings by changing these three files by surrounding #include &lt;boost/config/abi_prefix.hpp&gt; and #include &lt;boost/config/abi/suffix.hpp&gt; statements. </p> <blockquote> <p> For example: </p> <blockquote> <p> #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #include &lt;boost/config/abi_prefix.hpp&gt; <em> must be the last #include #ifdef BOOST_MSVC #pragma warning(pop) #endif </em></p> </blockquote> </blockquote> <p> It sounds like you've taken care of this and I'll get the fix next time I download Boost. Thanks a lot for your work. </p> <p> Mac Stevens mstevens@… </p> </description> <category>Ticket</category> </item> </channel> </rss>