I have exactly the same behaviour than my native linux compiler. I don't understand why DejaGnu exp files print such FAIL.
3 errors has to be printed when using -std=c++98 and 0 errors has to be printed when using -std=c++11. That's what my compiler does. 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. Only the last 'test for excess errors' seems to understand that no errors has to be printed when using -std=c++11 Here is the DejaGnu log : Running gcc-4.7.3/gcc/testsuite/g++.dg/dg.exp ... ALWAYS_CXXFLAGS set to additional_flags= ldflags= additional_flags=-fmessage-length=0 Executing on host: prism-g++ gcc-4.7.3/gcc/testsuite/g++.dg/cpp0x/auto27.C -fmessage-length=0 -std=c++98 -pedantic-errors -Wno-long-long -S -o auto27.s (timeout = 300) gcc-4.7.3/gcc/testsuite/g++.dg/cpp0x/auto27.C:3:14: error: ISO C++ forbids declaration of 'main' with no type [-pedantic] gcc-4.7.3/gcc/testsuite/g++.dg/cpp0x/auto27.C:3:14: error: top-level declaration of 'main' specifies 'auto' gcc-4.7.3/gcc/testsuite/g++.dg/cpp0x/auto27.C:3:14: error: trailing return type only available with -std=c++11 or -std=gnu++11 compiler exited with status 1 output is: gcc-4.7.3/gcc/testsuite/g++.dg/cpp0x/auto27.C:3:14: error: ISO C++ forbids declaration of 'main' with no type [-pedantic] gcc-4.7.3/gcc/testsuite/g++.dg/cpp0x/auto27.C:3:14: error: top-level declaration of 'main' specifies 'auto' gcc-4.7.3/gcc/testsuite/g++.dg/cpp0x/auto27.C:3:14: error: trailing return type only available with -std=c++11 or -std=gnu++11 PASS: g++.dg/cpp0x/auto27.C -std=c++98 std (test for errors, line 3) PASS: g++.dg/cpp0x/auto27.C -std=c++98 auto (test for errors, line 3) PASS: g++.dg/cpp0x/auto27.C -std=c++98 no type (test for errors, line 3) PASS: g++.dg/cpp0x/auto27.C -std=c++98 (test for excess errors) Executing on host: prism-g++ gcc-4.7.3/gcc/testsuite/g++.dg/cpp0x/auto27.C -fmessage-length=0 -std=c++11 -pedantic-errors -Wno-long-long -S -DSIGNAL_SUPPRESS -DNO_TRAMPOLINES -DSTACK_SIZE=0x4800 -o auto27.s (timeout = 300) FAIL: g++.dg/cpp0x/auto27.C -std=c++11 std (test for errors, line 3) FAIL: g++.dg/cpp0x/auto27.C -std=c++11 auto (test for errors, line 3) FAIL: g++.dg/cpp0x/auto27.C -std=c++11 no type (test for errors, line 3) PASS: g++.dg/cpp0x/auto27.C -std=c++11 (test for excess errors) -----Message d'origine----- De : Joseph Myers [mailto:jos...@codesourcery.com] Envoyé : mardi 10 décembre 2013 18:22 À : BELBACHIR Selim Cc : gcc@gcc.gnu.org Objet : Re: cpp0x test suite PASS/FAIL On Tue, 10 Dec 2013, BELBACHIR Selim wrote: > FAIL: g++.dg/cpp0x/auto27.C -std=c++11 std (test for errors, line 3) > FAIL: g++.dg/cpp0x/auto27.C -std=c++11 auto (test for errors, line 3) > FAIL: g++.dg/cpp0x/auto27.C -std=c++11 no type (test for errors, line > 3) That means that the desired result is an error message on that line, and either there was no such error message or the error message did not match what the testcase expected. > Should I ignore the FAILs when the comment contains '(test for errors' > and consider that those tests are parts of a larger test with comment > '(test for excess errors' ? No, FAILs indicate a bug in either the compiler or the testcase (or in your test environment, etc.); don't ignore them. -- Joseph S. Myers jos...@codesourcery.com