summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/OpenProjects.html7
-rw-r--r--www/analyzer/latest_checker.html.incl2
-rw-r--r--www/analyzer/release_notes.html50
-rw-r--r--www/analyzer/scan-build.html2
-rw-r--r--www/cxx_status.html56
-rw-r--r--www/get_started.html15
-rw-r--r--www/hacking.html88
-rw-r--r--www/libstdc++4.4-clang0x.patch369
8 files changed, 518 insertions, 71 deletions
diff --git a/www/OpenProjects.html b/www/OpenProjects.html
index 52fcabe..b3e0841 100644
--- a/www/OpenProjects.html
+++ b/www/OpenProjects.html
@@ -100,6 +100,13 @@ experience -- it should be easy to cross compile applications, install support
for new architectures, access different compilers and tools, and be consistent
across different platforms. See the <a href="UniversalDriver.html">Universal
Driver</a> web page for more information.</li>
+
+<li><b>XML Representation of ASTs</b>: Clang maintains a rich Abstract Syntax Tree that describes the program. Clang could emit an XML document that describes the program, which others tools could consume rather than being tied directly to the Clang binary.The XML representation needs to meet several requirements:
+ <ul>
+ <li><i>General</i>, so that it's able to represent C/C++/Objective-C abstractly, and isn't tied to the specific internal ASTs that Clang uses.</li>
+ <li><i>Documented</i>, with appropriate Schema against which the output of Clang's XML formatter can be verified.</li>
+ <li><i>Stable</i> across Clang versions.</li>
+ </ul></li>
</ul>
</div>
diff --git a/www/analyzer/latest_checker.html.incl b/www/analyzer/latest_checker.html.incl
index 7cd6b2b..99151a8 100644
--- a/www/analyzer/latest_checker.html.incl
+++ b/www/analyzer/latest_checker.html.incl
@@ -1 +1 @@
-<b><a href="/checker/checker-255.tar.bz2">checker-255.tar.bz2</a></b> (built February 11, 2011)
+<b><a href="/checker/checker-256.tar.bz2">checker-256.tar.bz2</a></b> (built April 13, 2011)
diff --git a/www/analyzer/release_notes.html b/www/analyzer/release_notes.html
index 7b6924f..163e84f 100644
--- a/www/analyzer/release_notes.html
+++ b/www/analyzer/release_notes.html
@@ -15,6 +15,56 @@
<h1>Release notes for <tt>checker-XXX</tt> builds</h1>
+<h4 id="checker_256">checker-256</h4>
+
+<p><b>built:</b> April 13, 2011<br>
+<b>download:</b> <a href="/checker/checker-256.tar.bz2">checker-256.tar.bz2</a></p>
+<p><b>highlights:</b></p>
+
+<ul>
+ <li>Lots of bug fixes and improvements to analyzer precision (fewer false positives, possibly more bugs found).
+ <li>Introductory analysis support for C++ and Objective-C++.
+</ul>
+
+<p>This build contains basic support for C++ and Objective-C++ that is ready to be tried out
+ by general users. It is still in its infancy, but establishes a baseline for things to come. The main hope is that it can find some
+ issues and have a reasonable false positive rate.</p>
+
+<p><b>Please</b> <a href="/filing_bugs.html">file bugs</a> when you see issues of any kind so we can assess
+ where development on C++ analysis support needs to be focused.</p>
+
+<p>To try out C++ analysis support, it should work out of the box using <tt>scan-build</tt>. If you are using this checker build
+ as a replacement to the analyzer bundled with Xcode, first use the <tt>set-xcode-analyzer</tt> script to <a href="/xcode.html">change Xcode to use
+ your version of the analyzer</a>. You will then need to modify one configuration file in Xcode to enable C++ analysis support. This can
+ be done with the following steps:</p>
+
+<ol>
+ <li>Find the clang .xcspec file:
+<pre>$ cd /Developer/Library
+$ find . | grep xcspec | grep Clang
+./Xcode/<b>&lt;SNIP&gt;</b>/Clang LLVM 1.0.xcplugin/Contents/Resources/Clang LLVM 1.0.xcspec
+</pre></li>
+ <li>The exact location of the file may vary depending on your installation of Xcode. Edit that file, and look for the string &quot;--analyze&quot;:
+<pre>
+ SourceFileOption = "--analyze";
+ FileTypes = (
+ "sourcecode.c.c",
+ "sourcecode.c.objc",
+ );
+ ...
+</pre>
+ Change the &quot;FileTypes&quot; entry to:
+<pre>
+ FileTypes = (
+ "sourcecode.c.c",
+ "sourcecode.c.objc",
+ "sourcecode.cpp.cpp",
+ "sourcecode.cpp.objcpp",
+ );
+</pre></li>
+<li>Restart Xcode.</li>
+</ol>
+
<h4 id="checker_255">checker-255</h4>
<p><b>built:</b> February 11, 2011<br>
diff --git a/www/analyzer/scan-build.html b/www/analyzer/scan-build.html
index 1db15fe..6c2833e 100644
--- a/www/analyzer/scan-build.html
+++ b/www/analyzer/scan-build.html
@@ -293,7 +293,7 @@ following things in mind:</p>
this as your configuration with Xcode or by passing <tt>-configuration
Debug</tt> to <tt>xcodebuild</tt>.</li>
<li>Analyze your project using the <tt>Simulator</tt> as your base SDK. It is
-possible to analyze your code when targetting the device, but this is much
+possible to analyze your code when targeting the device, but this is much
easier to do when using Xcode's <i>Build and Analyze</i> feature.</li>
<li>Check that your code signing SDK is set to the simulator SDK as well, and make sure this option is set to <tt>Don't Code Sign</tt>.</li>
</ul>
diff --git a/www/cxx_status.html b/www/cxx_status.html
index e4a915a..5545a81 100644
--- a/www/cxx_status.html
+++ b/www/cxx_status.html
@@ -25,7 +25,7 @@
<!--*************************************************************************-->
<h1>C++ and C++'0x Support in Clang</h1>
<!--*************************************************************************-->
-<p>Last updated: $Date: 2011-02-23 01:41:16 +0100 (Wed, 23 Feb 2011) $</p>
+<p>Last updated: $Date: 2011-05-01 09:04:31 +0200 (Sun, 01 May 2011) $</p>
<ul>
<li><a href="#projects">Projects Building with Clang</a></li>
@@ -85,6 +85,11 @@
ISO C++ standard (1998/2003). This section tracks the status of various C++0x
features.</p>
+<p>You can use clang in C++0x mode either
+with <a href="http://libcxx.llvm.org/">libc++</a> or with gcc's libstdc++.
+libstdc++-4.4 requires <a href="libstdc++4.4-clang0x.patch">a patch</a> to work
+with clang; other versions have not been tested.</p>
+
<h2 id="specification">Implementation Status by Feature</h2>
@@ -168,7 +173,7 @@ components are:</p>
welcome!</p>
<table width="689" border="1" cellspacing="0">
-<tr><td colspan="7" align="center" bgcolor="#ffddaa">C++0x Features (current draft report <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3225.pdf">here</a>) </td>
+<tr><td colspan="7" align="center" bgcolor="#ffddaa">C++0x Features (current draft report <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3291.pdf">here</a>)</td>
</tr>
<tr>
<th>Feature</th>
@@ -182,12 +187,13 @@ welcome!</p>
<tr><td colspan="7" class="category">Control Flow Modifications</td></tr>
<tr>
<td>Range-based for loop</td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
+ <td class="complete" align="center">&#x2713;</td>
+ <td class="complete" align="center">&#x2713;</td>
+ <td class="complete" align="center">&#x2713;</td>
+ <td class="complete" align="center">&#x2713;</td>
<td>6.5.4</td>
- <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2007/n2243.html">N2243</a></td>
+ <td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2007/n2243.html">N2243</a>
+ <a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2011/n3271.htm">N3271</a></td>
</tr>
<tr><td colspan="7" class="category">Type System Modifications</td></tr>
@@ -216,10 +222,10 @@ welcome!</p>
</tr>
<tr>
<td>auto type deduction</td>
- <td class="complete" align="center"></td>
- <td class="complete" align="center"></td>
- <td class="complete" align="center"></td>
- <td class="complete" align="center"></td>
+ <td class="complete" align="center">&#x2713;</td>
+ <td class="complete" align="center">&#x2713;</td>
+ <td class="complete" align="center">&#x2713;</td>
+ <td class="complete" align="center">&#x2713;</td>
<td>7.1.6.2, 7.1.6.4</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">N1984</a></td>
</tr>
@@ -310,7 +316,7 @@ welcome!</p>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2378.pdf">N2378</a></td>
</tr>
<tr>
- <td>POD defintion changes</td>
+ <td>POD definition changes</td>
<td></td>
<td></td>
<td></td>
@@ -342,10 +348,10 @@ welcome!</p>
<tr><td colspan="7" class="category">Class Modifications</td></tr>
<tr>
<td>delegating constructors</td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
+ <td class="complete"></td>
+ <td class="complete"></td>
+ <td class="complete"></td>
+ <td class="complete"></td>
<td>12.6.2</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986">N1986</a></td>
</tr>
@@ -454,14 +460,14 @@ welcome!</p>
</tr>
<tr>
<td>template aliases</td>
- <td></td>
- <td></td>
- <td></td>
+ <td class="basic"></td>
+ <td class="basic"></td>
+ <td class="basic"></td>
<td></td>
<td>7.1.3, 14.6.7</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1489.pdf">N1489</a>
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf">N2258</a>
- Includes non-template type aliasing
+ Only non-template type aliases implemented
</td>
</tr>
<tr>
@@ -515,7 +521,7 @@ welcome!</p>
<tr><td colspan="7" class="category">Preprocessor Modifications</td></tr>
<tr>
<td>__STDC_HOSTED__</td>
- <td></td>
+ <td class="complete"></td>
<td class="na">N/A</td>
<td class="na">N/A</td>
<td class="na">N/A</td>
@@ -580,10 +586,10 @@ welcome!</p>
<tr><td colspan="7" class="category">Things Completely New</td></tr>
<tr>
<td>Late-specified return type</td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
+ <td class="complete" align="center">&#x2713;</td>
+ <td class="complete" align="center">&#x2713;</td>
+ <td class="complete" align="center">&#x2713;</td>
+ <td class="basic"></td>
<td>8.3.5</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2445.html">N2445</a></td>
</tr>
diff --git a/www/get_started.html b/www/get_started.html
index 54f7442..f8745f96 100644
--- a/www/get_started.html
+++ b/www/get_started.html
@@ -129,15 +129,15 @@ Visual Studio:</p>
<li><b>Python</b>. This is needed only if you will be running the tests
(which is essential, if you will be developing for clang).
Get it from:
- <a href="http://www.python.org/download">
- http://www.python.org/download</a></li>
+ <a href="http://www.python.org/download/">
+ http://www.python.org/download/</a></li>
<li><b>GnuWin32 tools</b>
These are also necessary for running the tests.
(Note that the grep from MSYS or Cygwin doesn't work with the tests
because of embedded double-quotes in the search strings. The GNU
grep does work in this case.)
- Get them from <a href="http://getgnuwin32.sourceforge.net">
- http://getgnuwin32.sourceforge.net</a>.</li>
+ Get them from <a href="http://getgnuwin32.sourceforge.net/">
+ http://getgnuwin32.sourceforge.net/</a>.</li>
</ul>
<li>Checkout LLVM:</li>
@@ -157,6 +157,13 @@ Visual Studio:</p>
<li>If you are using Visual Studio 2005: <tt>cmake -G "Visual Studio 8 2005" ..\llvm</tt></li>
<li>Or if you are using Visual Studio 2008: <tt>cmake -G "Visual Studio 9 2008" ..\llvm</tt></li>
<li>Or if you are using Visual Studio 2010: <tt>cmake -G "Visual Studio 10" ..\llvm</tt></li>
+ <li>By default, cmake will target LLVM to X86. If you want all targets
+ (needed if you want to run the LLVM tests), add the <tt>-DLLVM_TARGETS_TO_BUILD=all</tt> option to the
+ cmake command line. Or specify a target from the LLVM_TARGETS_TO_BUILD
+ definition in CMakeLists.txt.</li>
+ <li>See the <a href="http://www.llvm.org/docs/CMake.html">LLVM CMake guide</a> for
+ more information on other configuration options for cmake.</li>
+</li>
<li>The above, if successful, will have created an LLVM.sln file in the
llvm directory.
</ul>
diff --git a/www/hacking.html b/www/hacking.html
index 978c99f..969a39c 100644
--- a/www/hacking.html
+++ b/www/hacking.html
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
@@ -14,7 +14,7 @@
<!--*********************************************************************-->
<h1>Hacking on Clang</h1>
<!--*********************************************************************-->
-
+
<p>This document provides some hints for how to get started hacking
on Clang for developers who are new to the Clang and/or LLVM
codebases.</p>
@@ -24,18 +24,18 @@
<li><a href="#debugging">Debugging</a></li>
<li><a href="#testing">Testing</a></li>
<ul>
- <li><a href="#testingNonWindows">Testing on Unix-like Systems</a></li>
- <li><a href="#testingWindows">Testing using Visual Studio on Windows</a></li>
- <li><a href="#testingCommands">Testing on the Command Line</a></li>
- </ul>
+ <li><a href="#testingNonWindows">Testing on Unix-like Systems</a></li>
+ <li><a href="#testingWindows">Testing using Visual Studio on Windows</a></li>
+ <li><a href="#testingCommands">Testing on the Command Line</a></li>
+ </ul>
<li><a href="#patches">Creating Patch Files</a></li>
<li><a href="#irgen">LLVM IR Generation</a></li>
</ul>
-
+
<!--=====================================================================-->
<h2 id="docs">Coding Standards</h2>
<!--=====================================================================-->
-
+
<p>Clang follows the
LLVM <a href="http://llvm.org/docs/CodingStandards.html">Coding
Standards</a>. When submitting patches, please take care to follow these standards
@@ -56,14 +56,14 @@
<!--=====================================================================-->
<h2 id="docs">Developer Documentation</h2>
<!--=====================================================================-->
-
+
<p>Both Clang and LLVM use doxygen to provide API documentation. Their
respective web pages (generated nightly) are here:</p>
<ul>
<li><a href="http://clang.llvm.org/doxygen">Clang</a></li>
<li><a href="http://llvm.org/doxygen">LLVM</a></li>
</ul>
-
+
<p>For work on the LLVM IR generation, the LLVM assembly language
<a href="http://llvm.org/docs/LangRef.html">reference manual</a> is
also useful.</p>
@@ -71,7 +71,7 @@
<!--=====================================================================-->
<h2 id="debugging">Debugging</h2>
<!--=====================================================================-->
-
+
<p>Inspecting data structures in a debugger:</p>
<ul>
<li>Many LLVM and Clang data structures provide
@@ -84,18 +84,18 @@
qualifiers, and the <tt>getTypePtr()</tt> method to get the
wrapped <tt>Type*</tt> which you can then dump.</li>
</ul>
-
+
<!--=====================================================================-->
<h2 id="testing">Testing</h2>
<!--=====================================================================-->
-
+
<p><i>[Note: The test running mechanism is currently under revision, so the
following might change shortly.]</i></p>
-
+
<!--=====================================================================-->
<h3 id="testingNonWindows">Testing on Unix-like Systems</h3>
<!--=====================================================================-->
-
+
<p>Clang includes a basic regression suite in the tree which can be
run with <tt>make test</tt> from the top-level clang directory, or
just <tt>make</tt> in the <em>test</em> sub-directory.
@@ -113,15 +113,15 @@
the test runner that an error is expected at the current line.
Any output files produced by the test will be placed under
a created Output directory.</p>
-
+
<p>During the run of <tt>make test</tt>, the terminal output will
display a line similar to the following:</p>
-
+
<ul><tt>--- Running clang tests for i686-pc-linux-gnu ---</tt></ul>
-
+
<p>followed by a line continually overwritten with the current test
file being compiled, and an overall completion percentage.</p>
-
+
<p>After the <tt>make test</tt> run completes, the absence of any
<tt>Failing Tests (count):</tt> message indicates that no tests
failed unexpectedly. If any tests did fail, the
@@ -148,38 +148,46 @@
override LLVMGCC, as in: <tt>make LLVMGCC="clang -std=gnu89"
TEST=nightly report</tt> (make sure <tt>clang</tt> is in your PATH or use the
full path).</p>
-
+
<!--=====================================================================-->
<h3 id="testingWindows">Testing using Visual Studio on Windows</h3>
<!--=====================================================================-->
<p>The Clang test suite can be run from either Visual Studio or
the command line.</p>
-
+
<p>Note that the test runner is based on
Python, which must be installed. Find Python at:
- <a href="http://www.python.org/download">http://www.python.org/download</a>.
+ <a href="http://www.python.org/download/">http://www.python.org/download/</a>.
Download the latest stable version (2.6.2 at the time of this writing).</p>
-
+
<p>The GnuWin32 tools are also necessary for running the tests.
- (Note that the grep from MSYS or Cygwin doesn't work with the tests
- because of embedded double-quotes in the search strings. The GNU
- grep does work in this case.)
- Get them from <a href="http://getgnuwin32.sourceforge.net">
- http://getgnuwin32.sourceforge.net</a>.</p>
-
+ Get them from <a href="http://getgnuwin32.sourceforge.net/">
+ http://getgnuwin32.sourceforge.net/</a>.
+ If the environment variable <tt>%PATH%</tt> does not have GnuWin32,
+ or if other grep(s) supercedes GnuWin32 on <tt>%PATH%,</tt>
+ you should specify <tt>LLVM_LIT_TOOLS_DIR</tt>
+ to CMake explicitly.</p>
+
<p>The cmake build tool is set up to create Visual Studio project files
for running the tests, "clang-test" being the root. Therefore, to
run the test from Visual Studio, right-click the clang-test project
and select "Build".</p>
-
+
+ <p>
+ Please see also
+ <a href="http://llvm.org/docs/GettingStartedVS.html">Getting Started
+ with the LLVM System using Microsoft Visual Studio</a> and
+ <a href="http://llvm.org/docs/CMake.html">Building LLVM with CMake</a>.
+ </p>
+
<!--=====================================================================-->
<h3 id="testingCommands">Testing on the Command Line</h3>
<!--=====================================================================-->
<p>To run all the tests from the command line, execute a command like
the following:</p>
-
+
<tt>
python (path to llvm)/llvm/utils/lit/lit.py -sv --no-progress-bar
(path to llvm)/llvm/tools/clang/test
@@ -190,14 +198,14 @@
<tt>--param=build_config=(build config)</tt>.</p>
<p>To run a single test:</p>
-
+
<tt>
python (path to llvm)/llvm/utils/lit/lit.py -sv --no-progress-bar
(path to llvm)/llvm/tools/clang/test/(dir)/(test)
</tt>
<p>For example:</p>
-
+
<tt>
python C:/Tools/llvm/utils/lit/lit.py -sv --no-progress-bar
C:/Tools/llvm/tools/clang/test/Sema/wchar.c
@@ -215,7 +223,7 @@ Testing Time: 81.52s
Expected Passes : 2503
Expected Failures : 28
Unsupported Tests : 3
-</pre></tt>
+</pre></tt>
<p>The statistic, "Unexpected Failures" (not shown if all tests pass), is the important one.</p>
@@ -224,24 +232,24 @@ Testing Time: 81.52s
<!--=====================================================================-->
<p>To return changes to the Clang team, unless you have checkin
- privileges, the prefered way is to send patch files to the
+ privileges, the preferred way is to send patch files to the
cfe-commits mailing list, with an explanation of what the patch is for.
Or, if you have questions, or want to have a wider discussion of what
you are doing, such as if you are new to Clang development, you can use
the cfe-dev mailing list also.
</p>
-
+
<p>To create these patch files, change directory
to the llvm/tools/clang root and run:</p>
-
+
<ul><tt>svn diff (relative path) >(patch file name)</tt></ul>
<p>For example, for getting the diffs of all of clang:</p>
-
+
<ul><tt>svn diff . >~/mypatchfile.patch</tt></ul>
<p>For example, for getting the diffs of a single file:</p>
-
+
<ul><tt>svn diff lib/Parse/ParseDeclCXX.cpp >~/ParseDeclCXX.patch</tt></ul>
<p>Note that the paths embedded in the patch depend on where you run it,
@@ -256,7 +264,7 @@ Testing Time: 81.52s
Representation (IR). Historically, this was referred to as
"codegen", and the Clang code for this lives
in <tt>lib/CodeGen</tt>.</p>
-
+
<p>The output is most easily inspected using the <tt>-emit-llvm</tt>
option to clang (possibly in conjunction with <tt>-o -</tt>). You
can also use <tt>-emit-llvm-bc</tt> to write an LLVM bitcode file
diff --git a/www/libstdc++4.4-clang0x.patch b/www/libstdc++4.4-clang0x.patch
new file mode 100644
index 0000000..8b9916d
--- /dev/null
+++ b/www/libstdc++4.4-clang0x.patch
@@ -0,0 +1,369 @@
+This patch was generated from the headers installed by MacPorts
+gcc-4.4 on OS X 10.6. You can apply it there with
+`cd /opt/local/include/gcc44/c++ ; sudo patch -p1 <this_patch`, or similar
+on other operating systems. Mail cfe-dev if you find other problems in the
+standard headers.
+
+This patch is offered under the same modified GPLv3 as libstdc++-4.4.
+
+diff -ur a/bits/move.h b/bits/move.h
+--- a/bits/move.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/move.h 2011-03-29 10:33:39.000000000 -0700
+@@ -48,13 +48,35 @@
+
+ template<typename _Tp>
+ inline _Tp&&
+- forward(typename std::identity<_Tp>::type&& __t)
++ forward(typename std::remove_reference<_Tp>::type& __t)
++#ifdef __clang__
++ { return static_cast<_Tp&&>(__t); }
++#else
+ { return __t; }
++#endif
++
++ template<typename _Tp>
++ inline _Tp&&
++ forward(typename std::remove_reference<_Tp>::type&& __t)
++ {
++#ifdef __clang__
++ static_assert(!std::is_lvalue_reference<_Tp>::value,
++ "Can't instantiate this forward() with an"
++ " lvalue reference type.");
++ return static_cast<_Tp&&>(__t);
++#else
++ return __t;
++#endif
++ }
+
+ template<typename _Tp>
+ inline typename std::remove_reference<_Tp>::type&&
+ move(_Tp&& __t)
++#ifdef __clang__
++ { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
++#else
+ { return __t; }
++#endif
+
+ _GLIBCXX_END_NAMESPACE
+
+diff -ur a/bits/stl_deque.h b/bits/stl_deque.h
+--- a/bits/stl_deque.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_deque.h 2011-03-29 10:33:39.000000000 -0700
+@@ -1395,11 +1395,7 @@
+ * std::swap(d1,d2) will feed to this function.
+ */
+ void
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(deque&& __x)
+-#else
+ swap(deque& __x)
+-#endif
+ {
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+diff -ur a/bits/stl_iterator.h b/bits/stl_iterator.h
+--- a/bits/stl_iterator.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_iterator.h 2011-03-29 10:33:39.000000000 -0700
+@@ -913,7 +913,7 @@
+
+ reference
+ operator*() const
+- { return *_M_current; }
++ { return std::move(*_M_current); }
+
+ pointer
+ operator->() const
+diff -ur a/bits/stl_list.h b/bits/stl_list.h
+--- a/bits/stl_list.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_list.h 2011-03-29 10:33:39.000000000 -0700
+@@ -1106,11 +1106,7 @@
+ * function.
+ */
+ void
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(list&& __x)
+-#else
+ swap(list& __x)
+-#endif
+ {
+ _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
+
+@@ -1160,6 +1156,12 @@
+ }
+ }
+
++#ifdef __GXX_EXPERIMENTAL_CXX0X__
++ void
++ splice(iterator __position, list& __x)
++ { splice(__position, std::move(__x)); }
++#endif
++
+ /**
+ * @brief Insert element from another %list.
+ * @param position Iterator referencing the element to insert before.
+@@ -1187,6 +1189,12 @@
+ this->_M_transfer(__position, __i, __j);
+ }
+
++#ifdef __GXX_EXPERIMENTAL_CXX0X__
++ void
++ splice(iterator __position, list& __x, iterator __i)
++ { splice(__position, std::move(__x), __i); }
++#endif
++
+ /**
+ * @brief Insert range from another %list.
+ * @param position Iterator referencing the element to insert before.
+@@ -1217,6 +1225,13 @@
+ }
+ }
+
++#ifdef __GXX_EXPERIMENTAL_CXX0X__
++ void
++ splice(iterator __position, list& __x, iterator __first,
++ iterator __last)
++ { splice(__position, std::move(__x), __first, __last); }
++#endif
++
+ /**
+ * @brief Remove all elements equal to value.
+ * @param value The value to remove.
+@@ -1287,6 +1302,10 @@
+ void
+ #ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x);
++
++ void
++ merge(list& __x)
++ { merge(std::move(__x)); }
+ #else
+ merge(list& __x);
+ #endif
+@@ -1307,6 +1326,11 @@
+ void
+ #ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&&, _StrictWeakOrdering);
++
++ template<typename _StrictWeakOrdering>
++ void
++ merge(list& __l, _StrictWeakOrdering __comp)
++ { merge(std::move(__l), __comp); }
+ #else
+ merge(list&, _StrictWeakOrdering);
+ #endif
+diff -ur a/bits/stl_map.h b/bits/stl_map.h
+--- a/bits/stl_map.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_map.h 2011-03-29 10:33:39.000000000 -0700
+@@ -608,11 +608,7 @@
+ * that std::swap(m1,m2) will feed to this function.
+ */
+ void
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(map&& __x)
+-#else
+ swap(map& __x)
+-#endif
+ { _M_t.swap(__x._M_t); }
+
+ /**
+diff -ur a/bits/stl_multimap.h b/bits/stl_multimap.h
+--- a/bits/stl_multimap.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_multimap.h 2011-03-29 10:33:39.000000000 -0700
+@@ -544,11 +544,7 @@
+ * std::swap(m1,m2) will feed to this function.
+ */
+ void
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(multimap&& __x)
+-#else
+ swap(multimap& __x)
+-#endif
+ { _M_t.swap(__x._M_t); }
+
+ /**
+diff -ur a/bits/stl_multiset.h b/bits/stl_multiset.h
+--- a/bits/stl_multiset.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_multiset.h 2011-03-29 10:33:39.000000000 -0700
+@@ -376,11 +376,7 @@
+ * std::swap(s1,s2) will feed to this function.
+ */
+ void
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(multiset&& __x)
+-#else
+ swap(multiset& __x)
+-#endif
+ { _M_t.swap(__x._M_t); }
+
+ // insert/erase
+diff -ur a/bits/stl_pair.h b/bits/stl_pair.h
+--- a/bits/stl_pair.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_pair.h 2011-03-29 10:33:39.000000000 -0700
+@@ -84,10 +84,21 @@
+ : first(__a), second(__b) { }
+
+ #ifdef __GXX_EXPERIMENTAL_CXX0X__
+- template<class _U1, class _U2>
++ template<class _U1, class = typename
++ std::enable_if<std::is_convertible<_U1, _T1>::value>::type>
++ pair(_U1&& __x, const _T2& __y)
++ : first(std::forward<_U1>(__x)), second(__y) { }
++
++ template<class _U2, class = typename
++ std::enable_if<std::is_convertible<_U2, _T2>::value>::type>
++ pair(const _T1& __x, _U2&& __y)
++ : first(__x), second(std::forward<_U2>(__y)) { }
++
++ template<class _U1, class _U2, class = typename
++ std::enable_if<std::is_convertible<_U1, _T1>::value
++ && std::is_convertible<_U2, _T2>::value>::type>
+ pair(_U1&& __x, _U2&& __y)
+- : first(std::forward<_U1>(__x)),
+- second(std::forward<_U2>(__y)) { }
++ : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
+
+ pair(pair&& __p)
+ : first(std::move(__p.first)),
+@@ -107,11 +118,19 @@
+ second(std::move(__p.second)) { }
+
+ // http://gcc.gnu.org/ml/libstdc++/2007-08/msg00052.html
++
++#if 0
++ // This constructor is incompatible with libstdc++-4.6, and it
++ // interferes with passing NULL pointers to the 2-argument
++ // constructors, so we disable it. map::emplace isn't
++ // implemented in libstdc++-4.4 anyway, and that's what this
++ // constructor was here for.
+ template<class _U1, class _Arg0, class... _Args>
+ pair(_U1&& __x, _Arg0&& __arg0, _Args&&... __args)
+ : first(std::forward<_U1>(__x)),
+ second(std::forward<_Arg0>(__arg0),
+ std::forward<_Args>(__args)...) { }
++#endif
+
+ pair&
+ operator=(pair&& __p)
+@@ -131,7 +150,7 @@
+ }
+
+ void
+- swap(pair&& __p)
++ swap(pair& __p)
+ {
+ using std::swap;
+ swap(first, __p.first);
+diff -ur a/bits/stl_set.h b/bits/stl_set.h
+--- a/bits/stl_set.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_set.h 2011-03-29 10:33:39.000000000 -0700
+@@ -383,11 +383,7 @@
+ * std::swap(s1,s2) will feed to this function.
+ */
+ void
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(set&& __x)
+-#else
+ swap(set& __x)
+-#endif
+ { _M_t.swap(__x._M_t); }
+
+ // insert/erase
+diff -ur a/bits/stl_tree.h b/bits/stl_tree.h
+--- a/bits/stl_tree.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_tree.h 2011-03-29 10:33:39.000000000 -0700
+@@ -675,11 +675,7 @@
+ { return _M_get_Node_allocator().max_size(); }
+
+ void
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(_Rb_tree&& __t);
+-#else
+ swap(_Rb_tree& __t);
+-#endif
+
+ // Insert/erase.
+ pair<iterator, bool>
+@@ -1104,11 +1100,7 @@
+ typename _Compare, typename _Alloc>
+ void
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __t)
+-#else
+ swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t)
+-#endif
+ {
+ if (_M_root() == 0)
+ {
+diff -ur a/bits/stl_vector.h b/bits/stl_vector.h
+--- a/bits/stl_vector.h 2011-03-15 14:49:05.000000000 -0700
++++ b/bits/stl_vector.h 2011-03-29 10:33:39.000000000 -0700
+@@ -923,11 +923,7 @@
+ * std::swap(v1,v2) will feed to this function.
+ */
+ void
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(vector&& __x)
+-#else
+ swap(vector& __x)
+-#endif
+ {
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+diff -ur a/exception_ptr.h b/exception_ptr.h
+--- a/exception_ptr.h 2011-03-15 14:49:08.000000000 -0700
++++ b/exception_ptr.h 2011-03-29 10:33:39.000000000 -0700
+@@ -140,7 +140,7 @@
+ friend bool
+ operator==(const exception_ptr&, const exception_ptr&) throw();
+
+- const type_info*
++ const class type_info*
+ __cxa_exception_type() const throw();
+ };
+
+diff -ur a/ext/algorithm b/ext/algorithm
+--- a/ext/algorithm 2011-03-15 14:49:05.000000000 -0700
++++ b/ext/algorithm 2011-03-29 10:33:39.000000000 -0700
+@@ -423,6 +423,9 @@
+ __out_last - __out_first);
+ }
+
++#ifdef __GXX_EXPERIMENTAL_CXX0X__
++ using std::is_heap;
++#else
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+@@ -462,6 +465,7 @@
+
+ return std::__is_heap(__first, __comp, __last - __first);
+ }
++#endif
+
+ // is_sorted, a predicated testing whether a range is sorted in
+ // nondescending order. This is an extension, not part of the C++
+diff -ur a/ext/vstring.h b/ext/vstring.h
+--- a/ext/vstring.h 2011-03-15 14:49:05.000000000 -0700
++++ b/ext/vstring.h 2011-03-29 10:33:39.000000000 -0700
+@@ -152,7 +152,7 @@
+ * string.
+ */
+ __versa_string(__versa_string&& __str)
+- : __vstring_base(std::forward<__vstring_base>(__str)) { }
++ : __vstring_base(std::move(__str)) { }
+
+ /**
+ * @brief Construct string from an initializer list.
+@@ -1439,11 +1439,7 @@
+ * constant time.
+ */
+ void
+-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+- swap(__versa_string&& __s)
+-#else
+ swap(__versa_string& __s)
+-#endif
+ { this->_M_swap(__s); }
+
+ // String operations:
OpenPOWER on IntegriCloud