public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++-v3 expected: Don't test ABI-variant properties in requirements.cc
@ 2022-04-05 16:43 Hans-Peter Nilsson
  2022-04-05 18:47 ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Hans-Peter Nilsson @ 2022-04-05 16:43 UTC (permalink / raw)
  To: gcc-patches, libstdc++

Ok to commit?
-------------- 8< --------------

Without this, for a target where alignment and structure-sizes are by
default byte-aligned, such as cris-elf, you'll see, in libstdc++.log:

/X/gcc/libstdc++-v3/testsuite/20_util/expected/requirements.cc:127: error: static assertion failed
/X/gcc/libstdc++-v3/testsuite/20_util/expected/requirements.cc:127: note: the comparison reduces to '(5 == 2)'
compiler exited with status 1
FAIL: 20_util/expected/requirements.cc (test for excess errors)
Excess errors:
/X/gcc/libstdc++-v3/testsuite/20_util/expected/requirements.cc:127: error: static assertion failed

It seems the intent is a smoke-test and that conditionals for ABI
properties are out of scope, so best to just delete this particular
line.

libstdc++-v3/:
	* testsuite/20_util/expected/requirements.cc: Don't test
	ABI-variant properties of expected<>.
---
 libstdc++-v3/testsuite/20_util/expected/requirements.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/20_util/expected/requirements.cc b/libstdc++-v3/testsuite/20_util/expected/requirements.cc
index 485aa338679c..a51a007a4fc3 100644
--- a/libstdc++-v3/testsuite/20_util/expected/requirements.cc
+++ b/libstdc++-v3/testsuite/20_util/expected/requirements.cc
@@ -124,6 +124,5 @@ static_assert( move_assignable< void, G > );
 // QoI properties
 static_assert( sizeof(std::expected<char, unsigned char>) == 2 );
 static_assert( sizeof(std::expected<void, char>) == 2 );
-static_assert( sizeof(std::expected<void*, char>) == 2 * __alignof(void*) );
 static_assert( alignof(std::expected<void, char>) == 1 );
 static_assert( alignof(std::expected<void*, char>) == alignof(void*) );
-- 
2.30.2


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

end of thread, other threads:[~2022-04-06 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 16:43 [PATCH] libstdc++-v3 expected: Don't test ABI-variant properties in requirements.cc Hans-Peter Nilsson
2022-04-05 18:47 ` Jonathan Wakely
2022-04-06 14:42   ` Hans-Peter Nilsson
2022-04-06 15:57     ` Jonathan Wakely

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