]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: fix target for linkage-1.C
authorMarek Polacek <polacek@redhat.com>
Tue, 19 Mar 2024 21:15:38 +0000 (17:15 -0400)
committerMarek Polacek <polacek@redhat.com>
Tue, 19 Mar 2024 21:16:59 +0000 (17:16 -0400)
This test fails in C++11 due to:

linkage-1.C:3:8: error: 'f' function uses 'auto' type specifier without trailing return type
    3 | inline auto f() {
      |        ^~~~
linkage-1.C:3:8: note: deduced return type only available with '-std=c++14' or '-std=gnu++14'

Compile it in C++14 thus.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/linkage-1.C: Use target c++14.

gcc/testsuite/g++.dg/cpp2a/linkage-1.C

index 888ed6fa5b59b0a5f568cced2ca3f0dd850568d3..2b83ffe55b7c7f8db95af058f85516a08798b3e3 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++11 } }
+// { dg-do compile { target c++14 } }
 
 inline auto f() {
   struct A {};