From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 8F25C3858D1E; Fri, 23 Dec 2022 09:44:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F25C3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671788647; bh=hme6aBI07kXomNonrNOf+p3r3LNdWQodIkHDAUNcEsE=; h=From:To:Subject:Date:From; b=QrufotKsVIaqunoFooI1tNEykmTGXpbnNexProEogbCgYMxKVM1f9dl0UJFnO8K4b xuRTVoyFHp7Ekq37XqleuGWwAv3pm7Ov/RN0tYRVErFkL9t39w/Q1S5I97pCzaqbzB CGaPfQ/ShoD338gWqqEtkPtG6NEpSv/Z4tkNbiIs= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-4871] libstdc++: Remove problematic static_assert from src/c++20/tzdb.cc X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: a846817739c1e7b930d593cd51963d6b46b5dfc6 X-Git-Newrev: db3c5831f80e674b9ee77c1e9ca8364a72ca5758 Message-Id: <20221223094407.8F25C3858D1E@sourceware.org> Date: Fri, 23 Dec 2022 09:44:07 +0000 (GMT) List-Id: https://gcc.gnu.org/g:db3c5831f80e674b9ee77c1e9ca8364a72ca5758 commit r13-4871-gdb3c5831f80e674b9ee77c1e9ca8364a72ca5758 Author: Jonathan Wakely Date: Fri Dec 23 09:19:38 2022 +0000 libstdc++: Remove problematic static_assert from src/c++20/tzdb.cc 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. Diff: --- libstdc++-v3/src/c++20/tzdb.cc | 1 - 1 file changed, 1 deletion(-) 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.