[committed] libstdc++: Remove problematic static_assert from src/c++20/tzdb.cc

Message ID 20221223094421.832354-1-jwakely@redhat.com
State Repeat Merge
Headers
Series [committed] libstdc++: Remove problematic static_assert from src/c++20/tzdb.cc |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jonathan Wakely Dec. 23, 2022, 9:44 a.m. UTC
  Tested x86_64-linux. Pushed to trunk.

-- >8 --

This assertion fails for cris-elf where sizeof(datetime) is only 7, due
to lower alignment requirements. The assertion was used while I was
writing the code to check that the objects were as compact as I wanted,
but it doesn't need to be kept now.

libstdc++-v3/ChangeLog:

	* src/c++20/tzdb.cc: Remove static_assert.
---
 libstdc++-v3/src/c++20/tzdb.cc | 1 -
 1 file changed, 1 deletion(-)
  

Patch

diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc
index a0bb03173a9..a02bcd4aec7 100644
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -448,7 +448,6 @@  namespace std::chrono
       // This allows on_day to reuse padding of at_time.
       // This keeps the size to 8 bytes and the alignment to 4 bytes.
       struct datetime : at_time { on_day day; };
-      static_assert(sizeof(datetime) == 8 && alignof(datetime) == 4);
 
       // TODO combining name+letters into a single string (like in ZoneInfo)
       // would save sizeof(string) and make Rule fit in a single cacheline.