Module Name: src Committed By: rillig Date: Sun Jun 27 18:48:45 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: main1.c Added Files: src/tests/usr.bin/xlint/lint1: c11_generic_expression.c c11_generic_expression.exp Log Message: lint: fix option -Ac11, add test for _Generic Previously, selecting the option -Ac11 allowed features from C11 but at the same time prohibited 'long long', which was added in C99. This was caused by the option -s, which is interpreted as "allow features from C90, but no later". The test for _Generic, which has been added in C11, demonstrates that the current implementation is broken. Lint currently thinks that the return type of a _Generic selection is the type of the expression, but it really is the type of the selected expression. In the current tests, this is always 'const char *', but C11 does not require that the types of a generic selection are compatible. To generate a diff of this commit: cvs rdiff -u -r1.1065 -r1.1066 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.66 -r1.67 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/c11_generic_expression.c \ src/tests/usr.bin/xlint/lint1/c11_generic_expression.exp cvs rdiff -u -r1.59 -r1.60 src/tests/usr.bin/xlint/lint1/t_integration.sh cvs rdiff -u -r1.45 -r1.46 src/usr.bin/xlint/lint1/main1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.