[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: commit 452fee36 causes trouble when compiling with clang
From: |
Paul Eggert |
Subject: |
Re: commit 452fee36 causes trouble when compiling with clang |
Date: |
Sun, 23 Aug 2020 13:41:45 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 8/23/20 7:28 AM, Bruno Haible wrote:
Thanks for the report. I didn't know that __typeof__ does not work for all
kinds of expressions. (intprops uses __typeof__ as well.)
Almost all the places intprops.h uses __typeof__ are safe since they can't or
shouldn't be bitfields. (Pretty much anything that uses sizeof will fail on
bit-fields at compile-time.)
There was one place where the __typeof__ would have caused an unnecessary
compile-time error, and I fixed that in the first attached patch, which also
adds comments about arguments that shouldn't use bit-fields. The second attached
patch is a minor cleanup.
0001-intprops-fix-INT_MULTIPLY_WRAPV-bit-field-bug.patch
Description: Text Data
0002-intprops-be-consistent-about-X-vs-X-0.patch
Description: Text Data