diff mbox series

[committed] libstdc++: Fix experimental/names.cc failure on AIX

Message ID 20240202135505.2285472-1-jwakely@redhat.com
State New
Headers show
Series [committed] libstdc++: Fix experimental/names.cc failure on AIX | expand

Commit Message

Jonathan Wakely Feb. 2, 2024, 1:54 p.m. UTC
Tested x86_64-linux and powerpc-ibm-aix7.3.1.0. Pushed to trunk.

-- >8 --

This fails due to "u" being used in a system header.

FAIL: experimental/names.cc  -std=gnu++17 (test for excess errors)
Excess errors:
/usr/include/sys/poll.h:77: error: expected unqualified-id before ';' token
/usr/include/sys/poll.h:77: error: expected ')' before ';' token

FAIL: experimental/names.cc  -std=gnu++17 (test for excess errors)
Excess errors:
/usr/include/sys/poll.h:102: error: expected unqualified-id before ';' token
/usr/include/sys/poll.h:102: error: expected ')' before ';' token

libstdc++-v3/ChangeLog:

	* testsuite/17_intro/names.cc [_AIX]: Undefine "u".
---
 libstdc++-v3/testsuite/17_intro/names.cc | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
index 53c5aff219d..784da9a7352 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -240,6 +240,8 @@ 
 #undef r
 #undef x
 #undef y
+// <sys/poll.h> defines pollfd_ext::u on AIX 7.3
+#undef u
 // <sys/var.h> defines vario::v
 #undef v
 // <sys/timer.h> defines trb::func and cputime_tmr::func