Module Name: src Committed By: rillig Date: Wed Jun 30 10:56:24 UTC 2021
Modified Files: src/usr.bin/xlint/common: inittyp.c Log Message: lint: fix bit-size of long double _Complex in portable mode C99 6.2.5p13 says that LCOMPLEX has the same representation and alignment requirements as an array type containing exactly two LDOUBLE. When support for _Complex was added to lint in inittyp.c 1.10 from 2008-09-27, there was no explanation for making the bit-size of LCOMPLEX different from what C99 says, so it was probably a mistake that went unnoticed for more than 12 years. It's an edge case anyway. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/xlint/common/inittyp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/common/inittyp.c diff -u src/usr.bin/xlint/common/inittyp.c:1.23 src/usr.bin/xlint/common/inittyp.c:1.24 --- src/usr.bin/xlint/common/inittyp.c:1.23 Tue Jun 29 21:33:09 2021 +++ src/usr.bin/xlint/common/inittyp.c Wed Jun 30 10:56:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: inittyp.c,v 1.23 2021/06/29 21:33:09 rillig Exp $ */ +/* $NetBSD: inittyp.c,v 1.24 2021/06/30 10:56:24 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: inittyp.c,v 1.23 2021/06/29 21:33:09 rillig Exp $"); +__RCSID("$NetBSD: inittyp.c,v 1.24 2021/06/30 10:56:24 rillig Exp $"); #endif #include <limits.h> @@ -115,13 +115,8 @@ inittyp(void) 0, 0, 1, 1, 1, 1, "float _Complex"), typeinfo(DCOMPLEX, DCOMPLEX, DCOMPLEX, DOUBLE_SIZE * 2, 64 * 2, 0, 0, 1, 1, 1, 1, "double _Complex"), - /* - * XXX: with -p, LCOMPLEX.tt_portable_size_in_bits != - * 2 * LDOUBLE.tt_portable_size_in_bits. - * This may or may not have been intentional. - */ typeinfo(LCOMPLEX, LCOMPLEX, LCOMPLEX, - LDOUBLE_SIZE * 2, 64 * 2, + LDOUBLE_SIZE * 2, 80 * 2, 0, 0, 1, 1, 1, 1, "long double _Complex"), typeinfo(VOID, VOID, VOID, -1, -1, 0, 0, 0, 0, 0, 0, "void"),