diff --git a/distrib/sets/lists/tests/mi b/distrib/sets/lists/tests/mi index da8f23671dde..e39738c1d92e 100644 --- a/distrib/sets/lists/tests/mi +++ b/distrib/sets/lists/tests/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1069 2021/06/29 13:58:13 rillig Exp $ +# $NetBSD: mi,v 1.1070 2021/06/29 21:33:08 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6205,7 +6205,7 @@ ./usr/tests/usr.bin/xlint/lint1/emit.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/emit.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/emit.exp-ln tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/xlint/lint1/emit.ln obsolete obsolete +./usr/tests/usr.bin/xlint/lint1/emit.ln tests-obsolete obsolete ./usr/tests/usr.bin/xlint/lint1/expr_range.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/expr_range.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/feat_stacktrace.c tests-usr.bin-tests compattestfile,atf @@ -6223,7 +6223,7 @@ ./usr/tests/usr.bin/xlint/lint1/lex_char.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/lex_char.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/lex_char_uchar.c tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/xlint/lint1/lex_char_uchar.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/lex_char_uchar.exp tests-obsolete obsolete ./usr/tests/usr.bin/xlint/lint1/lex_comment.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/lex_comment.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/lex_floating.c tests-usr.bin-tests compattestfile,atf diff --git a/tests/usr.bin/xlint/lint1/Makefile b/tests/usr.bin/xlint/lint1/Makefile index 571ec8947907..ec478045eb64 100644 --- a/tests/usr.bin/xlint/lint1/Makefile +++ b/tests/usr.bin/xlint/lint1/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.71 2021/06/29 13:58:13 rillig Exp $ +# $NetBSD: Makefile,v 1.72 2021/06/29 21:33:09 rillig Exp $ NOMAN= # defined MAX_MESSAGE= 345 # see lint1/err.c @@ -126,7 +126,6 @@ FILES+= gcc_typeof_after_statement.exp FILES+= lex_char.c FILES+= lex_char.exp FILES+= lex_char_uchar.c -FILES+= lex_char_uchar.exp FILES+= lex_comment.c FILES+= lex_comment.exp FILES+= lex_floating.c diff --git a/tests/usr.bin/xlint/lint1/lex_char_uchar.c b/tests/usr.bin/xlint/lint1/lex_char_uchar.c index 25d0fe1a096b..a984ae2c759e 100644 --- a/tests/usr.bin/xlint/lint1/lex_char_uchar.c +++ b/tests/usr.bin/xlint/lint1/lex_char_uchar.c @@ -1,4 +1,4 @@ -/* $NetBSD: lex_char_uchar.c,v 1.2 2021/06/29 14:19:51 rillig Exp $ */ +/* $NetBSD: lex_char_uchar.c,v 1.3 2021/06/29 21:33:09 rillig Exp $ */ # 3 "lex_char_uchar.c" /* @@ -9,9 +9,11 @@ /* lint1-only-if uchar */ /* - * FIXME: The warning is bogus; it must be possible to initialize a char - * variable with a character constant. - * See tree.c, function convert_constant. + * Before inittyp.c 1.23 from 2021-06-29, the following initialization + * triggered a wrong warning "conversion of 'int' to 'char' is out of range", + * but only on platforms where char has the same representation as unsigned + * char. There are only few of these platforms, which allowed this bug to + * survive for almost 26 years, since the initial commit of lint on + * 1995-07-03. */ -/* expect+1: conversion of 'int' to 'char' is out of range [119] */ char ch = '\xff'; diff --git a/tests/usr.bin/xlint/lint1/lex_char_uchar.exp b/tests/usr.bin/xlint/lint1/lex_char_uchar.exp deleted file mode 100644 index e8e2ccfb9c6a..000000000000 --- a/tests/usr.bin/xlint/lint1/lex_char_uchar.exp +++ /dev/null @@ -1 +0,0 @@ -lex_char_uchar.c(17): warning: conversion of 'int' to 'char' is out of range [119] diff --git a/usr.bin/xlint/common/inittyp.c b/usr.bin/xlint/common/inittyp.c index 7ebdbd404749..7ebc95899270 100644 --- a/usr.bin/xlint/common/inittyp.c +++ b/usr.bin/xlint/common/inittyp.c @@ -1,4 +1,4 @@ -/* $NetBSD: inittyp.c,v 1.22 2021/03/27 11:08:00 rillig Exp $ */ +/* $NetBSD: inittyp.c,v 1.23 2021/06/29 21:33:09 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: inittyp.c,v 1.22 2021/03/27 11:08:00 rillig Exp $"); +__RCSID("$NetBSD: inittyp.c,v 1.23 2021/06/29 21:33:09 rillig Exp $"); #endif #include @@ -77,7 +77,8 @@ inittyp(void) typeinfo(BOOL, BOOL, BOOL, CHAR_SIZE, 1, 1, 1, 0, 1, 1, 0, "_Bool"), typeinfo(CHAR, SCHAR, UCHAR, CHAR_SIZE, 8, - 1, 0, 0, 1, 1, 0, "char"), + 1, /*CONSTCOND*/ TARG_CHAR_MIN == 0 ? 1 : 0, + /* */ 0, 1, 1, 0, "char"), typeinfo(SCHAR, SCHAR, UCHAR, CHAR_SIZE, 8, 1, 0, 0, 1, 1, 0, "signed char"), typeinfo(UCHAR, SCHAR, UCHAR, CHAR_SIZE, 8,