Boost C++ Libraries: Ticket #6502: Many warnings when using Intel compiler https://svn.boost.org/trac10/ticket/6502 <p> When using icc 12 on Linux, I get two warnings very fequently (this is not the exact text): </p> <ul><li><a class="closed ticket" href="https://svn.boost.org/trac10/ticket/411" title="#411: Bugs: Another config correction for Sun C++ (closed: None)">#411</a>, no constructor in boost::proto::expr to initialize reference members </li><li><a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2536" title="#2536: Patches: cxxabi.h not available with non-GNU library (closed: fixed)">#2536</a>, useless const qualifier on return type </li></ul><p> I suppose <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2536" title="#2536: Patches: cxxabi.h not available with non-GNU library (closed: fixed)">#2536</a> is actually wrong, it's not useless and it's a trick that Proto uses (right?) </p> <p> I'm not sure about <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/411" title="#411: Bugs: Another config correction for Sun C++ (closed: None)">#411</a> though. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6502 Trac 1.4.3 Mathias Gaunard Mon, 06 Feb 2012 18:28:05 GMT <link>https://svn.boost.org/trac10/ticket/6502#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6502#comment:1</guid> <description> <p> I was the one who submitted that bug, it appears I didn't log in properly. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Mon, 19 Mar 2012 22:17:24 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6502#comment:2 https://svn.boost.org/trac10/ticket/6502#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> Warning 2536 is certainly wrong. By const-qualifying temporary expressions, I guarantee that they can be bound to arguments of function templates that are non-const references; that is, in the code below, the type <code>T</code> is deduced to be <code>S const</code>. </p> <pre class="wiki">struct S {}; S const make_S() { return S(); } template&lt;typename T&gt; void fun(T &amp; t) {} int main() { fun(make_S()); } </pre><p> Had <code>make_S</code> not returned a const-qualified value, it could not have been passed to <code>fun</code>. Proto uses this trick to eliminate superflous overloads. </p> <p> As for warning 411, there is no problem I know of with putting references in structs and initializing them with aggregate initialization instead of with constructors. In fact, adding a constructor to Proto's expression types would make them non-POD, voiding any guarantees about static construction. </p> <p> If you can tell me how to push/pop/disable warnings (like msvc), I can see about cleaning up the spew. Otherwise, we're just going to have to live with it. :-( </p> <p> Closing as invalid for now. </p> Ticket Mathias Gaunard Tue, 20 Mar 2012 00:13:15 GMT <link>https://svn.boost.org/trac10/ticket/6502#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6502#comment:3</guid> <description> <p> I believe icc supports the same syntax as msvc to disable warnings. I'll try to make a patch. </p> </description> <category>Ticket</category> </item> </channel> </rss>