Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src
Module Name: src
Committed By: rillig
Date: Mon Apr 5 02:05:47 UTC 2021
Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/xlint/lint1: Makefile t_integration.sh
src/usr.bin/xlint/lint1: Makefile err.c externs1.h tree.c
Added Files:
src/tests/usr.bin/xlint/lint1: msg_341.c msg_341.exp msg_342.c
msg_342.exp
Log Message:
lint: warn about for wrong type cast in argument to ctype.h functions
The argument to most of the functions from <ctype.h> "shall either be
representable as an 'unsigned char' or shall equal the value of the
macro EOF".
When confronted with the infamous warning 'array subscript has type
char', there are enough programmers who don't know the background of
that warning and thus fix it in a wrong way. Neither GCC nor Clang
explain its warning to target these programmers.
Both GCC and Clang warn about 'array subscript has type char', but they
ignore the other requirements of the <ctype.h> functions, even though
these are in the C standard library.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94182
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95177
https://stackoverflow.com/a/60696378
To generate a diff of this commit:
cvs rdiff -u -r1.1036 -r1.1037 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.38 -r1.39 src/tests/usr.bin/xlint/lint1/Makefile \
src/tests/usr.bin/xlint/lint1/t_integration.sh
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_341.c \
src/tests/usr.bin/xlint/lint1/msg_341.exp \
src/tests/usr.bin/xlint/lint1/msg_342.c \
src/tests/usr.bin/xlint/lint1/msg_342.exp
cvs rdiff -u -r1.64 -r1.65 src/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r1.101 -r1.102 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.99 -r1.100 src/usr.bin/xlint/lint1/externs1.h
cvs rdiff -u -r1.265 -r1.266 src/usr.bin/xlint/lint1/tree.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index