On Thu, Dec 14, 2023 at 07:59:26PM -0500, Patrick Palka wrote:
>       * g++.dg/abi/abi-tag25.C: New test.
>       * g++.dg/abi/abi-tag25a.C: New test.

Line 11 of abi-tag25.C is wrapped in #if __cpp_variable_templates
which isn't defined for -std=c++11, so we can't expect a warning
in that case either.

Tested on x86_64-linux with
GXX_TESTSUITE_STDS=98,11,14,17,20,23,26 make check-g++ 
RUNTESTFLAGS=dg.exp=abi-tag25a.C
and committed to trunk as obivous.

2023-12-18  Jakub Jelinek  <ja...@redhat.com>

        * g++.dg/abi/abi-tag25a.C: Expect second dg-warning only for c++14
        and later.

--- gcc/testsuite/g++.dg/abi/abi-tag25a.C.jj    2023-12-18 09:39:49.566353318 
+0100
+++ gcc/testsuite/g++.dg/abi/abi-tag25a.C       2023-12-18 09:47:21.163001320 
+0100
@@ -5,7 +5,7 @@
 #include "abi-tag25.C"
 
 // { dg-warning "mangled name" "" { target *-*-* } 5 }
-// { dg-warning "mangled name" "" { target *-*-* } 11 }
+// { dg-warning "mangled name" "" { target c++14 } 11 }
 
 // { dg-final { scan-assembler "_Z3funIiEvv" } }
 // { dg-final { scan-assembler "_Z3varIiE" { target c++14 } } }


        Jakub

Reply via email to