From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id E9A3A3858406; Tue, 4 Oct 2022 13:03:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9A3A3858406 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664888629; bh=TU2LjmN+2zZPDfzd+Vmv+TdYheb/pQlIXZ9U61Kb3ds=; h=From:To:Subject:Date:From; b=N6hEotycL7WXaxbLar6scAZbUfXf/rFlj02gJ9bhbfeW7uewbqU88OfgAXDiZ+0uc 2CYyvD4WCUYiQY9WGpycLWBeRHzKlbBBib4sYMiI3XnLwCI90SCN77uFwCzUSt7/kp +szpNsrFxSvSIW5FWXySpUZWp4Gd1zfx5/O/h76c= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] conform: Do not use __SIG_ATOMIC_TYPE__ X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: e65ffec23c2c5347baa99b6915184ec525e5e1fc X-Git-Newrev: 120447890265ebd2b282934a188e77f7f8d0a6db Message-Id: <20221004130349.E9A3A3858406@sourceware.org> Date: Tue, 4 Oct 2022 13:03:49 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=120447890265ebd2b282934a188e77f7f8d0a6db commit 120447890265ebd2b282934a188e77f7f8d0a6db Author: Adhemerval Zanella Date: Sun Apr 3 09:46:45 2022 -0300 conform: Do not use __SIG_ATOMIC_TYPE__ clang does not define __SIG_ATOMIC_TYPE__, instead add another directive ('size:') which instruct to use an interger type of defined minimum size. Diff: --- conform/conformtest.py | 4 ++++ conform/data/stdint.h-data | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/conform/conformtest.py b/conform/conformtest.py index abdfd40d11..2e27b9b132 100644 --- a/conform/conformtest.py +++ b/conform/conformtest.py @@ -172,6 +172,10 @@ class ConstantTest(object): c_type = self.c_type[len('promoted:'):] text = ('__typeof__ ((%s) 0 + (%s) 0) a2_%d;\n' % (c_type, c_type, self.num)) + elif self.c_type.startswith('size:'): + c_type = "int{}_t".format(self.c_type[len('size:'):]) + text = ('__typeof__ ((%s) 0 + (%s) 0) a2_%d;\n' + % (c_type, c_type, self.num)) else: text = '__typeof__ ((%s) 0) a2_%d;\n' % (self.c_type, self.num) text += 'extern __typeof__ (%s) a2_%d;\n' % (self.symbol, self.num) diff --git a/conform/data/stdint.h-data b/conform/data/stdint.h-data index 4e84e17fb8..5d65d4ecd5 100644 --- a/conform/data/stdint.h-data +++ b/conform/data/stdint.h-data @@ -88,8 +88,8 @@ macro-int-constant UINTMAX_MAX {promoted:uintmax_t} >= 18446744073709551615ULL macro-int-constant PTRDIFF_MIN {promoted:__PTRDIFF_TYPE__} <= -65535 macro-int-constant PTRDIFF_MAX {promoted:__PTRDIFF_TYPE__} >= 65535 -macro-int-constant SIG_ATOMIC_MIN {promoted:__SIG_ATOMIC_TYPE__} -macro-int-constant SIG_ATOMIC_MAX {promoted:__SIG_ATOMIC_TYPE__} >= 127 +macro-int-constant SIG_ATOMIC_MIN {size:__SIG_ATOMIC_WIDTH__} +macro-int-constant SIG_ATOMIC_MAX {size:__SIG_ATOMIC_WIDTH__} >= 127 macro-int-constant SIZE_MAX {promoted:__SIZE_TYPE__} >= 65535