I found a potential problem in "dejagnu-1.5.1/lib/framework.exp" (or previous version)
As I said before, in my case, the selector 'target std=c++98' doesn't seems to prevent the FAIL when -std=c++11 options is used in compiler flags. I noticed that -std=c++11 is my last compiler flag and in function "check_conditional_xfail" from dejagnu-1.5.1/lib/framework.exp (called by check-flags from gcc-4.7.3/gcc/testsuite/lib/target-supports-dg.exp) I saw the following lines : verbose "Looking for $opt to exclude in the compiler flags" 2 foreach j "$opt" { if {[string match "* $j *" $compiler_flags]} { verbose "Found $j to exclude in the compiler flags" 2 incr excl_hit } } 'string match' uses "* $j *" , i.e. a white space is required after each option in order to be properly matched. When an option is the last compiler flag then it cannot be matched because it is not followed by a white space. This explains why the dg-error is not ignored when compiler with -std=c++11 even if selector 'target c++98' is used. I may be the only one to meet this exact problem because for some reasons -std=c++xx options is my last flag AND some tests use a selector on this particular flag. But, imho the problem can be met on any other flag as far as it is the last compiler flag. Answer : (a) bug in the test harness code Am I right ? Selim -----Message d'origine----- De : Joseph Myers [mailto:jos...@codesourcery.com] Envoyé : mardi 10 décembre 2013 18:57 À : BELBACHIR Selim Cc : gcc@gcc.gnu.org Objet : RE: cpp0x test suite PASS/FAIL On Tue, 10 Dec 2013, BELBACHIR Selim wrote: > The selector 'target c++98' (in { dg-error "std=" "std" { target c++98 > } } for example) do not prevent the FAIL to be printed when -std=c++11 > options is used. Well, that would be a bug in one of (a) the test harness code, (b) the way the selector is used, (c) your DejaGnu installation. In none of those cases is ignoring the FAIL appropriate; both (a) and (c) could well cause other problems with inaccurate test results elsewhere in the testsuite. You'll need to investigate why DejaGnu isn't behaving as intended on your system. -- Joseph S. Myers jos...@codesourcery.com