public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] [PR100127] Test for coroutine header in clang-compatible tests
@ 2023-02-23 13:48 Alexandre Oliva
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2023-02-23 13:48 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:fd64a519b40e64ec4670f146191b523202432ea3

commit fd64a519b40e64ec4670f146191b523202432ea3
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 23 10:30:42 2023 -0300

    [PR100127] Test for coroutine header in clang-compatible tests
    
    The test is compatible with clang as well as gcc, but ISTM that
    testing for the __clang__ macro is just as potentially error-prone as
    macros that used to be GCC-specific are now defined in compilers that
    aim for GCC compatibility.  Use a __has_include feature test instead.
    
    
    for  gcc/testsuite/ChangeLog
    
            PR c++/100127
            * g++.dg/coroutines/pr100127.C: Test for header rather than
            compiler macro.

Diff:
---
 gcc/testsuite/g++.dg/coroutines/pr100127.C   | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-a.C | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-b.C | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/g++.dg/coroutines/pr100127.C b/gcc/testsuite/g++.dg/coroutines/pr100127.C
index 374cd710077..5879fd0bcc5 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100127.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100127.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
index a325d384fc3..06e705b0c65 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
@@ -1,5 +1,6 @@
 //  { dg-additional-options "-fsyntax-only " }
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
index 6cdf8d1e529..4ef80a99594 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] [PR100127] Test for coroutine header in clang-compatible tests
@ 2023-02-23 14:02 Alexandre Oliva
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2023-02-23 14:02 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:40cafa12f2ee4847661208540f95f86ebdc9f7dd

commit 40cafa12f2ee4847661208540f95f86ebdc9f7dd
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 23 11:01:15 2023 -0300

    [PR100127] Test for coroutine header in clang-compatible tests
    
    The test is compatible with clang as well as gcc, but ISTM that
    testing for the __clang__ macro is just as potentially error-prone as
    macros that used to be GCC-specific are now defined in compilers that
    aim for GCC compatibility.  Use a __has_include feature test instead.
    
    
    for  gcc/testsuite/ChangeLog
    
            PR c++/100127
            * g++.dg/coroutines/pr100127.C: Test for header rather than
            compiler macro.

Diff:
---
 gcc/testsuite/g++.dg/coroutines/pr100127.C   | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-a.C | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-b.C | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/g++.dg/coroutines/pr100127.C b/gcc/testsuite/g++.dg/coroutines/pr100127.C
index 374cd710077..5879fd0bcc5 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100127.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100127.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
index a325d384fc3..06e705b0c65 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
@@ -1,5 +1,6 @@
 //  { dg-additional-options "-fsyntax-only " }
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
index 6cdf8d1e529..4ef80a99594 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] [PR100127] Test for coroutine header in clang-compatible tests
@ 2023-02-23 13:56 Alexandre Oliva
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2023-02-23 13:56 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1bd29c51470c4cf9786dc53fb4418949ac522404

commit 1bd29c51470c4cf9786dc53fb4418949ac522404
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 23 10:30:42 2023 -0300

    [PR100127] Test for coroutine header in clang-compatible tests
    
    The test is compatible with clang as well as gcc, but ISTM that
    testing for the __clang__ macro is just as potentially error-prone as
    macros that used to be GCC-specific are now defined in compilers that
    aim for GCC compatibility.  Use a __has_include feature test instead.
    
    
    for  gcc/testsuite/ChangeLog
    
            PR c++/100127
            * g++.dg/coroutines/pr100127.C: Test for header rather than
            compiler macro.

Diff:
---
 gcc/testsuite/g++.dg/coroutines/pr100127.C   | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-a.C | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-b.C | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/g++.dg/coroutines/pr100127.C b/gcc/testsuite/g++.dg/coroutines/pr100127.C
index 374cd710077..5879fd0bcc5 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100127.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100127.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
index a325d384fc3..06e705b0c65 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
@@ -1,5 +1,6 @@
 //  { dg-additional-options "-fsyntax-only " }
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
index 6cdf8d1e529..4ef80a99594 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] [PR100127] Test for coroutine header in clang-compatible tests
@ 2023-02-23 13:26 Alexandre Oliva
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2023-02-23 13:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2c0ce54e80bfcada3f4c264bcd2040348967bffc

commit 2c0ce54e80bfcada3f4c264bcd2040348967bffc
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 16 06:52:00 2023 -0300

    [PR100127] Test for coroutine header in clang-compatible tests
    
    The test is compatible with clang as well as gcc, but ISTM that
    testing for the __clang__ macro is just as potentially error-prone as
    macros that used to be GCC-specific are now defined in compilers that
    aim for GCC compatibility.  Use a __has_include feature test instead.
    
    
    for  gcc/testsuite/ChangeLog
    
            PR c++/100127
            * g++.dg/coroutines/pr100127.C: Test for header rather than
            compiler macro.

Diff:
---
 gcc/testsuite/g++.dg/coroutines/pr100127.C   | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-a.C | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-b.C | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/g++.dg/coroutines/pr100127.C b/gcc/testsuite/g++.dg/coroutines/pr100127.C
index 374cd710077..5879fd0bcc5 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100127.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100127.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
index a325d384fc3..06e705b0c65 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
@@ -1,5 +1,6 @@
 //  { dg-additional-options "-fsyntax-only " }
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
index 6cdf8d1e529..4ef80a99594 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] [PR100127] Test for coroutine header in clang-compatible tests
@ 2023-02-22 17:23 Alexandre Oliva
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2023-02-22 17:23 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b1da436e929a6219c1bb4962463e5c6877cd36af

commit b1da436e929a6219c1bb4962463e5c6877cd36af
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 16 06:52:00 2023 -0300

    [PR100127] Test for coroutine header in clang-compatible tests
    
    The test is compatible with clang as well as gcc, but ISTM that
    testing for the __clang__ macro is just as potentially error-prone as
    macros that used to be GCC-specific are now defined in compilers that
    aim for GCC compatibility.  Use a __has_include feature test instead.
    
    
    for  gcc/testsuite/ChangeLog
    
            PR c++/100127
            * g++.dg/coroutines/pr100127.C: Test for header rather than
            compiler macro.

Diff:
---
 gcc/testsuite/g++.dg/coroutines/pr100127.C   | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-a.C | 3 ++-
 gcc/testsuite/g++.dg/coroutines/pr100772-b.C | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/g++.dg/coroutines/pr100127.C b/gcc/testsuite/g++.dg/coroutines/pr100127.C
index 374cd710077..5879fd0bcc5 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100127.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100127.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
index a325d384fc3..06e705b0c65 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
@@ -1,5 +1,6 @@
 //  { dg-additional-options "-fsyntax-only " }
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
index 6cdf8d1e529..4ef80a99594 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
@@ -1,4 +1,5 @@
-#ifdef __clang__
+#if !__has_include(<coroutine>) \
+  && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] [PR100127] Test for coroutine header in clang-compatible tests
@ 2023-02-16 11:12 Alexandre Oliva
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2023-02-16 11:12 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8474d8bc4d5b4666796109bdf0edabc0c3ae93ab

commit 8474d8bc4d5b4666796109bdf0edabc0c3ae93ab
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 16 06:52:00 2023 -0300

    [PR100127] Test for coroutine header in clang-compatible tests
    
    The test is compatible with clang as well as gcc, but ISTM that
    testing for the __clang__ macro is just as potentially error-prone as
    macros that used to be GCC-specific are now defined in compilers that
    aim for GCC compatibility.  Use a __has_include feature test instead.
    
    
    for  gcc/testsuite/ChangeLog
    
            PR c++/100127
            * g++.dg/coroutines/pr100127.C: Test for header rather than
            compiler macro.

Diff:
---
 gcc/testsuite/g++.dg/coroutines/pr100127.C   | 2 +-
 gcc/testsuite/g++.dg/coroutines/pr100772-a.C | 2 +-
 gcc/testsuite/g++.dg/coroutines/pr100772-b.C | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/g++.dg/coroutines/pr100127.C b/gcc/testsuite/g++.dg/coroutines/pr100127.C
index 374cd710077..1eaa72ff0ac 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100127.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100127.C
@@ -1,4 +1,4 @@
-#ifdef __clang__
+#if __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
index a325d384fc3..724c377c82e 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-a.C
@@ -1,5 +1,5 @@
 //  { dg-additional-options "-fsyntax-only " }
-#ifdef __clang__
+#if __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
index 6cdf8d1e529..4cf31e5f9e0 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
@@ -1,4 +1,4 @@
-#ifdef __clang__
+#if __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
 namespace std {
   using namespace std::experimental;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-23 14:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 13:48 [gcc(refs/users/aoliva/heads/testme)] [PR100127] Test for coroutine header in clang-compatible tests Alexandre Oliva
  -- strict thread matches above, loose matches on Subject: below --
2023-02-23 14:02 Alexandre Oliva
2023-02-23 13:56 Alexandre Oliva
2023-02-23 13:26 Alexandre Oliva
2023-02-22 17:23 Alexandre Oliva
2023-02-16 11:12 Alexandre Oliva

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).