public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] testsuite: fix target for linkage-1.C
@ 2024-03-19 21:18 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2024-03-19 21:18 UTC (permalink / raw)
  To: GCC Patches

Tested x86_64-pc-linux-gnu, applying to trunk.

-- >8 --
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/cpp2a/linkage-1.C b/gcc/testsuite/g++.dg/cpp2a/linkage-1.C
index 888ed6fa5b5..2b83ffe55b7 100644
--- a/gcc/testsuite/g++.dg/cpp2a/linkage-1.C
+++ b/gcc/testsuite/g++.dg/cpp2a/linkage-1.C
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++11 } }
+// { dg-do compile { target c++14 } }
 
 inline auto f() {
   struct A {};

base-commit: 9c91f8a88b2db50c8faf70786d3cef27b39ac9fc
-- 
2.44.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-19 21:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-19 21:18 [pushed] testsuite: fix target for linkage-1.C Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).