<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 15.03.2011 11:36, Jean-Daniel Dupas wrote:
    <blockquote
      cite="mid:A867EEF1-E89F-448D-930C-6F6F0C0603A0@shadowlab.org"
      type="cite">Hello,
      <div><br>
      </div>
      <div>After the commit r127596, it's not longer possible to use the
        gcc 4.2.1 libstdc++ while compiling c++0x code.</div>
      <div><br>
      </div>
      <div>For instance, just including <span class="Apple-style-span"
          style="color: rgb(123, 72, 47); font-family: Menlo; font-size:
          11px;"><span style="color: rgb(217, 40, 35);"><vector></span><font
            class="Apple-style-span" color="#000000" face="Helvetica"
            size="3"><span class="Apple-style-span"
              style="background-color: transparent; font-size: 12px;">
              in a file make clang emit the following diagnostics.</span></font></span></div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>--- test.cpp</div>
      <div><br>
      </div>
      <div>#include <span class="Apple-style-span" style="color:
          rgb(217, 40, 35); font-family: Menlo; font-size: 11px;"><vector></span></div>
      <div><span class="Apple-style-span" style="color: rgb(217, 40,
          35); font-family: Menlo; font-size: 11px;"><br>
        </span></div>
      <div><span class="Apple-style-span" style="background-color:
          transparent;">---------</span></div>
      <div><span class="Apple-style-span" style="background-color:
          transparent;"><br>
        </span></div>
      <div><span class="Apple-style-span" style="color: rgb(123, 72,
          47); font-family: Menlo;"><font class="Apple-style-span"
            color="#000000" face="Helvetica"><span
              class="Apple-style-span" style="background-color:
              transparent;"></span></font></span>
        <div style="margin: 0px; font: 12px Helvetica;">% clang++
          -std=c++0x -fsyntax-only test.cpp</div>
        <div style="margin: 0px; font: 12px Helvetica;">In file included
          from test.cpp:2:</div>
        <div style="margin: 0px; font: 12px Helvetica;">In file included
          from /usr/include/c++/4.2.1/vector:66:</div>
        <div style="margin: 0px; font: 12px Helvetica;">In file included
          from /usr/include/c++/4.2.1/bits/allocator.h:53:</div>
        <div style="margin: 0px; font: 12px Helvetica;">In file included
          from
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++allocator.h:39:</div>
        <div style="margin: 0px; font: 12px Helvetica;">In file included
          from /usr/include/c++/4.2.1/ext/new_allocator.h:37:</div>
        <div style="margin: 0px; font: 12px Helvetica;">/usr/include/c++/4.2.1/new:95:7:
          error: exception specification in declaration does not match
          previous declaration</div>
        <div style="margin: 0px; font: 12px Helvetica;">void* operator
          new(std::size_t) throw (std::bad_alloc);</div>
        <div style="margin: 0px; font: 12px Helvetica;">      ^</div>
        <div style="margin: 0px; font: 12px Helvetica;">note: previous
          declaration is here</div>
        <div style="margin: 0px; font: 12px Helvetica;">/usr/include/c++/4.2.1/new:96:7:
          error: exception specification in declaration does not match
          previous declaration</div>
        <div style="margin: 0px; font: 12px Helvetica;">void* operator
          new[](std::size_t) throw (std::bad_alloc);</div>
        <div style="margin: 0px; font: 12px Helvetica;">      ^</div>
        <div style="margin: 0px; font: 12px Helvetica;">note: previous
          declaration is here</div>
        <div style="margin: 0px; font: 12px Helvetica;">2 errors
          generated.</div>
        <div><br>
        </div>
        <div>I suppose this is a problem with libstdc++ 4.2.1 which is
          not standard compliant, but as it is widely used on OS X,
          maybe clang should do something to workaround the problem.</div>
        <br>
      </div>
    </blockquote>
    Yes, yes it should. That occurred to me too. The change in new's
    throw spec can definitely be a problem.<br>
    <br>
    Sebastian<br>
  </body>
</html>