aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-08-12 01:53:46 -0700
committerMichael Forney <mforney@mforney.org>2019-08-12 02:01:49 -0700
commit0d1969024c6fd7fa9aa729cf17860d0c172b56e0 (patch)
treeb68d38ff7638223933750372a6f0151be59958cb /decl.c
parente506961aabd683bfb54357c00f8150984bd0690f (diff)
Revert "expr: Fix cast of same type"
This reverts commit 1a38a5fc4844a0de8729be694a62ba0afce3ff52. This breaks comparisons bitfields in some cases, for instance extern struct {unsigned x:31;} s; int main(void) { return (unsigned)s.x - 1 < 0; } If we discard the cast, then it is a signed comparison because of integer promotion for bit-fields, otherwise it is an unsigned comparison. Additionally, the test case this was meant to fix is not actually ISO C, since casts must be to scalar types or `void`.
Diffstat (limited to 'decl.c')
0 files changed, 0 insertions, 0 deletions