Message ID | 4FB9822B.9080805@linaro.org |
---|---|
State | New |
Headers | show |
On 05/21/2012 01:45 AM, Michael Hope wrote: > 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? To be honest, when I saw the issue I thought we wanted simply to not use the target selector at all in the branch and simply add a // { dg-options "-std=c++11" } I thought somebody would commit the change as obvious ;) Paolo.
2012/5/21 Paolo Carlini <paolo.carlini@oracle.com>: > On 05/21/2012 01:45 AM, Michael Hope wrote: >> >> 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? > > To be honest, when I saw the issue I thought we wanted simply to not use the > target selector at all in the branch and simply add a // { dg-options > "-std=c++11" } I thought somebody would commit the change as obvious ;) Doesn't the target selector c++11 set -pedantic as well ?
On 05/21/2012 11:49 AM, Fabien Chêne wrote:
> Doesn't the target selector c++11 set -pedantic as well ?
You may be right, I didn't check, sorry. Then just add that too,
wouldn't be the first time.
Paolo.
=== 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++ { } {