The testsuite for PR52796 uses the 'target c++11' selector which doesn't exist 
in 4.6.
This patch backports the selector, clearing the 'ERROR: 
g++.dg/cpp0x/variadic-value1.C:
syntax error in target selector "target c++11" for " dg-do 2 run { target c++11 } 
"'
errors which have appeared in recent 4.6 builds.

Tested on x86_64-linux-gnu with no regressions.  Changes the ERROR to 
UNSUPPORTED.

OK for 4.6?

-- Michael

2012-05-21  Michael Hope  <michael.h...@linaro.org>

        PR 53170
        Backport from mainline
        2011-11-08  Jason Merrill  <ja...@redhat.com>
        * lib/target-supports.exp (check_effective_target_c++11): New.

=== modified file 'gcc/testsuite/lib/target-supports.exp'
--- gcc/testsuite/lib/target-supports.exp       2012-02-22 17:38:22 +0000
+++ gcc/testsuite/lib/target-supports.exp       2012-05-18 01:57:51 +0000
@@ -3822,6 +3822,17 @@
  return 0
 }

+# Check which language standard is active by checking for the presence of
+# one of the C++11 -std flags.  This assumes that the default for the
+# compiler is C++98, and that there will never be multiple -std= arguments
+# on the command line.
+proc check_effective_target_c++11 { } {
+    if ![check_effective_target_c++] {
+       return 0
+    }
+    return [check-flags { { } { } { -std=c++0x -std=gnu++0x -std=c++11 
-std=gnu++11 } }]
+}
+
 # Return 1 if the language for the compiler under test is C++.

 proc check_effective_target_c++ { } {

Reply via email to