lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
This commit is contained in:
rillig 2023-03-28 14:44:34 +00:00
parent 3c2f2cbb8f
commit b2baa50111
267 changed files with 764 additions and 378 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1254 2023/02/27 23:07:53 rillig Exp $
# $NetBSD: mi,v 1.1255 2023/03/28 14:44:34 rillig Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -7341,6 +7341,7 @@
./usr/tests/usr.bin/xlint/lint1/msg_349.c tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/xlint/lint1/msg_349.exp tests-obsolete obsolete,atf
./usr/tests/usr.bin/xlint/lint1/msg_350.c tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/xlint/lint1/msg_351.c tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/xlint/lint1/op_colon.c tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/xlint/lint1/op_colon.exp tests-obsolete obsolete,atf
./usr/tests/usr.bin/xlint/lint1/op_shl_lp64.c tests-usr.bin-tests compattestfile,atf

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 2013/09/11 23:04:11 joerg Exp $
# $NetBSD: Makefile,v 1.4 2023/03/28 14:44:34 rillig Exp $
.include <bsd.own.mk>
@ -17,6 +17,7 @@ SRCS+=ppath_malloc.c
LIBDPLIBS+= prop ${NETBSDSRCDIR}/lib/libprop
LINTFLAGS+=-w
LINTFLAGS.ppath_extant.c+= -X 351 # 'extern' declaration outside header
LIB= ppath
MAN+= ppath.3

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 2022/01/22 07:35:26 pho Exp $
# $NetBSD: Makefile,v 1.28 2023/03/28 14:44:34 rillig Exp $
#
.include <bsd.own.mk>
@ -17,5 +17,6 @@ MAN= puffs.3 puffs_cc.3 puffs_cred.3 puffs_flush.3 \
INCS= puffs.h puffsdump.h
INCSDIR= /usr/include
LINTFLAGS+=-S -w
LINTFLAGS+= -X 351 # extern declaration outside header
.include <bsd.lib.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.85 2019/10/13 07:28:11 mrg Exp $
# $NetBSD: Makefile,v 1.86 2023/03/28 14:44:34 rillig Exp $
# @(#)Makefile 8.1 (Berkeley) 6/4/93
USE_SHLIBDIR= yes
@ -38,6 +38,7 @@ MAN= efun.3 \
CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_UTIL_H
CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_NETATALK_AT_H
CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_NET_IF_DL_H
LINTFLAGS.if_media.c+= -X 351 # 'extern' declaration outside header
COPTS.logwtmp.c+= ${GCC_NO_STRINGOP_TRUNCATION}
COPTS.logwtmpx.c+= ${GCC_NO_STRINGOP_TRUNCATION}

View File

@ -1,4 +1,4 @@
/* $NetBSD: c11_generic_expression.c,v 1.14 2023/01/04 05:32:01 rillig Exp $ */
/* $NetBSD: c11_generic_expression.c,v 1.15 2023/03/28 14:44:34 rillig Exp $ */
# 3 "c11_generic_expression.c"
/*
@ -11,7 +11,7 @@
* C11 6.5.1.1 "Generic selection"
*/
/* lint1-extra-flags: -Ac11 */
/* lint1-extra-flags: -Ac11 -X 351 */
/*
* The type of 'var' is not compatible with any of the types from the

View File

@ -1,4 +1,4 @@
/* $NetBSD: c90.c,v 1.1 2021/07/25 22:03:42 rillig Exp $ */
/* $NetBSD: c90.c,v 1.2 2023/03/28 14:44:34 rillig Exp $ */
# 3 "c90.c"
/*
@ -6,7 +6,7 @@
* later C standards nor GNU extensions.
*/
/* lint1-flags: -sw */
/* lint1-flags: -sw -X 351 */
/* expect+1: error: ANSI C requires formal parameter before '...' [84] */
void varargs_function(...);

View File

@ -1,8 +1,10 @@
/* $NetBSD: d_c99_anon_union.c,v 1.4 2021/02/20 22:31:20 rillig Exp $ */
/* $NetBSD: d_c99_anon_union.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_anon_union.c"
/* struct with only anonymous members */
/* lint1-extra-flags: -X 351 */
struct foo {
union {
long loo;

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_c99_bool.c,v 1.9 2022/01/16 08:40:31 rillig Exp $ */
/* $NetBSD: d_c99_bool.c,v 1.10 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_bool.c"
/*
@ -9,6 +9,8 @@
* invoke undefined behavior.
*/
/* lint1-extra-flags: -X 351 */
/* Below, each false statement produces "negative array dimension" [20]. */
int int_0_converts_to_false[(_Bool)0 ? -1 : 1];

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_c99_bool_strict.c,v 1.39 2022/06/22 19:23:18 rillig Exp $ */
/* $NetBSD: d_c99_bool_strict.c,v 1.40 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_bool_strict.c"
/*
@ -98,7 +98,7 @@
* __lint_false and true to __lint_true, two predefined constant expressions.
*/
/* lint1-extra-flags: -hT */
/* lint1-extra-flags: -hT -X 351 */
/*
* strict-bool-typedef

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.18 2022/06/22 19:23:18 rillig Exp $ */
/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.19 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_bool_strict_syshdr.c"
/*
@ -11,7 +11,7 @@
* and functions from system headers may use int expressions as well.
*/
/* lint1-extra-flags: -T */
/* lint1-extra-flags: -T -X 351 */
extern const unsigned short *ctype_table;

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_c99_complex_num.c,v 1.2 2021/01/31 14:39:31 rillig Exp $ */
/* $NetBSD: d_c99_complex_num.c,v 1.3 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_complex_num.c"
/* lint1-extra-flags: -X 351 */
double cabs(double _Complex);
double cabs(double _Complex foo)

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_c99_complex_split.c,v 1.12 2023/02/05 10:57:48 rillig Exp $ */
/* $NetBSD: d_c99_complex_split.c,v 1.13 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_complex_split.c"
/*
@ -6,6 +6,8 @@
* accessed (since C99).
*/
/* lint1-extra-flags: -X 351 */
int
b(double a)
{

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_c99_flex_array_packed.c,v 1.2 2021/01/31 14:39:31 rillig Exp $ */
/* $NetBSD: d_c99_flex_array_packed.c,v 1.3 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_flex_array_packed.c"
/* lint1-extra-flags: -X 351 */
/* Allow packed c99 flexible arrays */
struct {
int x;

View File

@ -1,7 +1,8 @@
/* $NetBSD: d_c99_for_loops.c,v 1.3 2021/01/31 14:39:31 rillig Exp $ */
/* $NetBSD: d_c99_for_loops.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_for_loops.c"
/* c99 for loops */
/* lint1-extra-flags: -X 351 */
extern void foo(int);
int

View File

@ -1,8 +1,10 @@
/* $NetBSD: d_c99_func.c,v 1.5 2023/01/29 18:16:48 rillig Exp $ */
/* $NetBSD: d_c99_func.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_func.c"
/* C99 __func__ */
/* lint1-extra-flags: -X 351 */
const char *str;
const char *

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_c99_init.c,v 1.44 2023/02/05 13:01:28 rillig Exp $ */
/* $NetBSD: d_c99_init.c,v 1.45 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_init.c"
/*
@ -7,6 +7,8 @@
* See C99 6.7.8 "Initialization".
*/
/* lint1-extra-flags: -X 351 */
void use(const void *);

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_c99_nested_struct.c,v 1.4 2021/02/20 22:31:20 rillig Exp $ */
/* $NetBSD: d_c99_nested_struct.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_nested_struct.c"
/* lint1-extra-flags: -X 351 */
/* C99 nested struct init with named and non-named initializers */
typedef struct pthread_mutex_t {
unsigned int ptm_magic;

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_c99_struct_init.c,v 1.4 2021/02/20 22:31:20 rillig Exp $ */
/* $NetBSD: d_c99_struct_init.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_struct_init.c"
/* lint1-extra-flags: -X 351 */
/* C99 struct initialization */
struct {
int i;

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_c99_union_init1.c,v 1.4 2021/02/20 22:31:20 rillig Exp $ */
/* $NetBSD: d_c99_union_init1.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_union_init1.c"
/* lint1-extra-flags: -X 351 */
/* GCC-style and C99-style union initialization */
union {
int i;

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_c99_union_init2.c,v 1.3 2021/01/31 14:39:31 rillig Exp $ */
/* $NetBSD: d_c99_union_init2.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_union_init2.c"
/* lint1-extra-flags: -X 351 */
/* C99 union initialization */
union {
int i[10];

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_c99_union_init3.c,v 1.5 2021/02/20 22:31:20 rillig Exp $ */
/* $NetBSD: d_c99_union_init3.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_union_init3.c"
/* lint1-extra-flags: -X 351 */
/* C99 struct initialization */
struct {
int i[10];

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_c99_union_init4.c,v 1.3 2021/01/31 14:39:31 rillig Exp $ */
/* $NetBSD: d_c99_union_init4.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_union_init4.c"
/* lint1-extra-flags: -X 351 */
/* test .data.l[x] */
typedef struct {
int type;

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_c99_union_init5.c,v 1.1 2021/02/28 20:17:14 rillig Exp $ */
/* $NetBSD: d_c99_union_init5.c,v 1.2 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c99_union_init5.c"
/*
@ -8,6 +8,8 @@
* 2006.12.19.19.06.44.
*/
/* lint1-extra-flags: -X 351 */
union mist {
char *p;
int a[1];

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_c9x_array_init.c,v 1.3 2021/02/20 22:31:20 rillig Exp $ */
/* $NetBSD: d_c9x_array_init.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_c9x_array_init.c"
/* lint1-extra-flags: -X 351 */
/* GCC-specific array range initializers */
int foo[256] = {
[2] = 1,

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_cast_lhs.c,v 1.5 2021/07/04 13:14:54 rillig Exp $ */
/* $NetBSD: d_cast_lhs.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_cast_lhs.c"
/*
@ -9,6 +9,9 @@
* C99 6.5.4 "Cast operators" footnote 85 says "A cast does not yield an
* lvalue".
*/
/* lint1-extra-flags: -X 351 */
struct str {
int member;
};

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_cast_typeof.c,v 1.3 2021/01/31 14:39:31 rillig Exp $ */
/* $NetBSD: d_cast_typeof.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_cast_typeof.c"
/* lint1-extra-flags: -X 351 */
struct foo {
char list;
};

View File

@ -1,8 +1,10 @@
/* $NetBSD: d_compound_literals2.c,v 1.4 2022/04/24 20:08:23 rillig Exp $ */
/* $NetBSD: d_compound_literals2.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_compound_literals2.c"
/* compound literals */
/* lint1-extra-flags: -X 351 */
struct p {
short a, b, c, d;
} zz = {

View File

@ -1,8 +1,10 @@
/* $NetBSD: d_constant_conv1.c,v 1.4 2022/01/15 14:22:03 rillig Exp $ */
/* $NetBSD: d_constant_conv1.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_constant_conv1.c"
/* Flag information-losing constant conversion in argument lists */
/* lint1-extra-flags: -X 351 */
int f(unsigned int);
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_constant_conv2.c,v 1.5 2022/04/15 21:50:07 rillig Exp $ */
/* $NetBSD: d_constant_conv2.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_constant_conv2.c"
/* Flag information-losing constant conversion in argument lists */
@ -9,6 +9,7 @@
* non-prototype functions an issue.
*/
/* lint1-flags: -h -w */
/* lint1-extra-flags: -X 351 */
int f(unsigned int);

View File

@ -5,6 +5,8 @@
* that is completely different.
*/
/* lint1-extra-flags: -X 351 */
void func(int a, int b, int c);
/* expect+4: warning: argument 'num' unused in function 'func' [231] */

View File

@ -1,8 +1,10 @@
/* $NetBSD: d_gcc_compound_statements1.c,v 1.11 2022/06/15 18:11:02 rillig Exp $ */
/* $NetBSD: d_gcc_compound_statements1.c,v 1.12 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_gcc_compound_statements1.c"
/* GCC compound statement with expression */
/* lint1-extra-flags: -X 351 */
/*
* Compound statements are only allowed in functions, not at file scope.
*

View File

@ -1,10 +1,12 @@
/* $NetBSD: d_gcc_extension.c,v 1.6 2021/05/25 19:22:18 rillig Exp $ */
/* $NetBSD: d_gcc_extension.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_gcc_extension.c"
/*
* Test that the GCC '__extension__' and '__typeof' are recognized.
*/
/* lint1-extra-flags: -X 351 */
_Bool dbl_isinf(double);
/* extension */

View File

@ -1,10 +1,12 @@
/* $NetBSD: d_init_array_using_string.c,v 1.12 2022/06/22 19:23:18 rillig Exp $ */
/* $NetBSD: d_init_array_using_string.c,v 1.13 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_init_array_using_string.c"
/*
* Test initialization of arrays and pointers by string literals.
*/
/* lint1-extra-flags: -X 351 */
void sink(const void *);
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_lint_assert.c,v 1.6 2022/10/01 09:42:40 rillig Exp $ */
/* $NetBSD: d_lint_assert.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_lint_assert.c"
/*
@ -6,6 +6,8 @@
* just hard to trigger, but not impossible.
*/
/* lint1-extra-flags: -X 351 */
enum {
// Before decl.c 1.118 from 2021-01-10:
// lint: assertion "sym->s_scl == EXTERN || sym->s_scl == STATIC"

View File

@ -1,6 +1,8 @@
/* $NetBSD: d_nested_structs.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */
/* $NetBSD: d_nested_structs.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_nested_structs.c"
/* lint1-extra-flags: -X 351 */
/* Nested struct */
typedef void *EditLine;
typedef void *History;

View File

@ -1,8 +1,10 @@
/* $NetBSD: d_packed_structs.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */
/* $NetBSD: d_packed_structs.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_packed_structs.c"
/* packed tests */
/* lint1-extra-flags: -X 351 */
struct in_addr {
int x;
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_struct_init_nested.c,v 1.7 2022/01/15 14:22:03 rillig Exp $ */
/* $NetBSD: d_struct_init_nested.c,v 1.8 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_struct_init_nested.c"
/*
@ -8,6 +8,8 @@
* In C99, 6.7.8p13 describes exactly this case.
*/
/* lint1-extra-flags: -X 351 */
typedef enum O1 { O1C = 101 } O1;
typedef enum O2 { O2C = 102 } O2;
typedef enum O3 { O3C = 103 } O3;

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_type_conv1.c,v 1.5 2022/04/15 21:50:07 rillig Exp $ */
/* $NetBSD: d_type_conv1.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_type_conv1.c"
/* Flag information-losing type conversion in argument lists */
@ -9,6 +9,7 @@
* non-prototype functions an issue.
*/
/* lint1-flags: -g -h -w */
/* lint1-extra-flags: -X 351 */
int f(unsigned int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_type_conv2.c,v 1.5 2022/04/15 21:50:07 rillig Exp $ */
/* $NetBSD: d_type_conv2.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_type_conv2.c"
/* Flag information-losing type conversion in argument lists */
@ -9,6 +9,7 @@
* non-prototype functions an issue.
*/
/* lint1-flags: -h -w */
/* lint1-extra-flags: -X 351 */
int f(float);

View File

@ -1,4 +1,4 @@
/* $NetBSD: d_type_conv3.c,v 1.6 2022/04/15 21:50:07 rillig Exp $ */
/* $NetBSD: d_type_conv3.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_type_conv3.c"
/* Flag information-losing type conversion in argument lists */
@ -9,6 +9,7 @@
* non-prototype functions an issue.
*/
/* lint1-flags: -g -h -w */
/* lint1-extra-flags: -X 351 */
int f(unsigned int);

View File

@ -1,8 +1,10 @@
/* $NetBSD: d_typefun.c,v 1.3 2021/01/31 14:39:31 rillig Exp $ */
/* $NetBSD: d_typefun.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "d_typefun.c"
/* typedef of function parameter */
/* lint1-extra-flags: -X 351 */
typedef void (*free_func)(void *opaque, void *address);
typedef struct stack_st {

View File

@ -1,4 +1,4 @@
/* $NetBSD: decl.c,v 1.20 2022/10/01 09:42:40 rillig Exp $ */
/* $NetBSD: decl.c,v 1.21 2023/03/28 14:44:34 rillig Exp $ */
# 3 "decl.c"
/*
@ -6,6 +6,8 @@
* declaration-specifiers and the declarators.
*/
/* lint1-extra-flags: -X 351 */
/*
* Even though 'const' comes after 'char' and is therefore quite close to the
* first identifier, it applies to both identifiers.

View File

@ -1,4 +1,4 @@
/* $NetBSD: decl_arg.c,v 1.7 2022/06/20 21:13:36 rillig Exp $ */
/* $NetBSD: decl_arg.c,v 1.8 2023/03/28 14:44:34 rillig Exp $ */
# 3 "decl_arg.c"
/*
@ -7,6 +7,8 @@
* See arg_declaration in cgram.y.
*/
/* lint1-extra-flags: -X 351 */
typedef double number;
void no_args(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: decl_direct_abstract.c,v 1.7 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: decl_direct_abstract.c,v 1.8 2023/03/28 14:44:34 rillig Exp $ */
# 3 "decl_direct_abstract.c"
/*
@ -9,6 +9,8 @@
* See msg_155.c.
*/
/* lint1-extra-flags: -X 351 */
/*
* The following tests do not use int, to avoid confusion with the implicit
* return type.

View File

@ -1,6 +1,8 @@
/* $NetBSD: decl_struct_member.c,v 1.15 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: decl_struct_member.c,v 1.16 2023/03/28 14:44:34 rillig Exp $ */
# 3 "decl_struct_member.c"
/* lint1-extra-flags: -X 351 */
struct multi_attributes {
__attribute__((deprecated))
__attribute__((deprecated))

View File

@ -1,4 +1,4 @@
/* $NetBSD: emit.c,v 1.14 2022/10/01 09:42:40 rillig Exp $ */
/* $NetBSD: emit.c,v 1.15 2023/03/28 14:44:34 rillig Exp $ */
# 3 "emit.c"
/*
@ -7,8 +7,8 @@
* consistently across different translation units.
*/
/* Do not warn about unused parameters. */
/* lint1-extra-flags: -X 231 */
/* Do not warn about unused parameters or 'extern' declarations. */
/* lint1-extra-flags: -X 231 -X 351 */
/*
* Define some derived types.

View File

@ -1,4 +1,4 @@
/* $NetBSD: emit_lp64.c,v 1.1 2021/08/05 06:34:43 rillig Exp $ */
/* $NetBSD: emit_lp64.c,v 1.2 2023/03/28 14:44:34 rillig Exp $ */
# 3 "emit_lp64.c"
/*
@ -11,7 +11,7 @@
*/
// omit the option '-g' to avoid having the GCC builtins in the .ln file.
/* lint1-flags: -Sw */
/* lint1-flags: -Sw -X 351 */
/* lint1-only-if: lp64 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: expr_binary.c,v 1.6 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: expr_binary.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */
# 3 "expr_binary.c"
/*
@ -6,6 +6,7 @@
*/
/* lint1-only-if: lp64 */
/* lint1-extra-flags: -X 351 */
struct incompatible { /* just to generate the error message */
int member;

View File

@ -1,11 +1,11 @@
/* $NetBSD: expr_binary_trad.c,v 1.2 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: expr_binary_trad.c,v 1.3 2023/03/28 14:44:34 rillig Exp $ */
# 3 "expr_binary_trad.c"
/*
* Test binary operators in traditional C.
*/
/* lint1-flags: -tw */
/* lint1-flags: -tw -X 351 */
struct incompatible { /* just to generate the error message */
int member;

View File

@ -1,11 +1,11 @@
/* $NetBSD: expr_fold.c,v 1.7 2022/04/19 23:16:14 rillig Exp $ */
/* $NetBSD: expr_fold.c,v 1.8 2023/03/28 14:44:34 rillig Exp $ */
# 3 "expr_fold.c"
/*
* Test folding of constant expressions.
*/
/* lint1-extra-flags: -h */
/* lint1-extra-flags: -h -X 351 */
/*
* On ILP32 platforms, the integer constant 2147483648 cannot be represented

View File

@ -1,10 +1,12 @@
/* $NetBSD: expr_precedence.c,v 1.10 2022/08/25 19:03:48 rillig Exp $ */
/* $NetBSD: expr_precedence.c,v 1.11 2023/03/28 14:44:34 rillig Exp $ */
# 3 "expr_precedence.c"
/*
* Tests for the precedence among operators.
*/
/* lint1-extra-flags: -X 351 */
int var;
/*

View File

@ -1,11 +1,11 @@
/* $NetBSD: expr_promote.c,v 1.3 2023/01/04 05:47:19 rillig Exp $ */
/* $NetBSD: expr_promote.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "expr_promote.c"
/*
* Test arithmetic promotions in C90 and later.
*/
/* lint1-flags: -Sw */
/* lint1-flags: -Sw -X 351 */
void sink(const char *, ...);

View File

@ -1,11 +1,11 @@
/* $NetBSD: expr_promote_trad.c,v 1.3 2023/01/04 05:47:19 rillig Exp $ */
/* $NetBSD: expr_promote_trad.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "expr_promote_trad.c"
/*
* Test arithmetic promotions in traditional C.
*/
/* lint1-flags: -tw */
/* lint1-flags: -tw -X 351 */
sink();

View File

@ -1,4 +1,4 @@
/* $NetBSD: expr_range.c,v 1.4 2022/01/15 14:22:03 rillig Exp $ */
/* $NetBSD: expr_range.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "expr_range.c"
/*
@ -16,7 +16,7 @@
* possible values may be related to RangeConstraintManager, just guessing.
*/
/* lint1-extra-flags: -chap */
/* lint1-extra-flags: -chap -X 351 */
void println(const char *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: expr_sizeof.c,v 1.4 2023/01/16 00:37:59 rillig Exp $ */
/* $NetBSD: expr_sizeof.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "expr_sizeof.c"
/*
@ -6,6 +6,8 @@
* C11 6.5.3.4 "The sizeof operator"
*/
/* lint1-extra-flags: -X 351 */
/*
* A sizeof expression can either take a type name or an expression.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: gcc_attribute.c,v 1.12 2022/08/25 19:03:48 rillig Exp $ */
/* $NetBSD: gcc_attribute.c,v 1.13 2023/03/28 14:44:34 rillig Exp $ */
# 3 "gcc_attribute.c"
/*
@ -8,6 +8,8 @@
* https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html
*/
/* lint1-extra-flags: -X 351 */
void __attribute__((noinline))
do_not_inline(void)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: gcc_attribute_func.c,v 1.3 2022/06/11 11:52:13 rillig Exp $ */
/* $NetBSD: gcc_attribute_func.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "gcc_attribute_func.c"
/*
@ -7,6 +7,8 @@
* https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
*/
/* lint1-extra-flags: -X 351 */
void deprecated_function(void)
__attribute__((__noreturn__))
__attribute__((__aligned__(8), __cold__))

View File

@ -1,4 +1,4 @@
/* $NetBSD: gcc_attribute_label.c,v 1.3 2022/04/28 21:38:38 rillig Exp $ */
/* $NetBSD: gcc_attribute_label.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "gcc_attribute_label.c"
/*
@ -7,6 +7,8 @@
* https://gcc.gnu.org/onlinedocs/gcc/Label-Attributes.html
*/
/* lint1-extra-flags: -X 351 */
void dead(void);
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: gcc_attribute_stmt.c,v 1.3 2022/04/28 21:38:38 rillig Exp $ */
/* $NetBSD: gcc_attribute_stmt.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "gcc_attribute_stmt.c"
/*
@ -7,6 +7,8 @@
* https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html
*/
/* lint1-extra-flags: -X 351 */
void println(const char *);
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: gcc_attribute_var.c,v 1.7 2023/02/05 10:57:48 rillig Exp $ */
/* $NetBSD: gcc_attribute_var.c,v 1.8 2023/03/28 14:44:34 rillig Exp $ */
# 3 "gcc_attribute_var.c"
/*
@ -7,6 +7,8 @@
* https://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html
*/
/* lint1-extra-flags: -X 351 */
void
write_to_page(unsigned index, char ch)
{

View File

@ -1,6 +1,8 @@
/* $NetBSD: gcc_bit_field_types.c,v 1.8 2023/01/28 08:36:17 rillig Exp $ */
/* $NetBSD: gcc_bit_field_types.c,v 1.9 2023/03/28 14:44:34 rillig Exp $ */
# 3 "gcc_bit_field_types.c"
/* lint1-extra-flags: -X 351 */
struct incompatible {
int dummy;
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: gcc_init_compound_literal.c,v 1.6 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: gcc_init_compound_literal.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */
# 3 "gcc_init_compound_literal.c"
/*
@ -18,6 +18,8 @@
* temporary objects have neither storage class EXTERN nor STATIC.
*/
/* lint1-extra-flags: -X 351 */
// Seen in sys/crypto/aes/aes_ccm.c.
const struct {
const unsigned char *ctxt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: gcc_typeof.c,v 1.5 2023/01/21 08:04:43 rillig Exp $ */
/* $NetBSD: gcc_typeof.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "gcc_typeof.c"
/*
@ -7,6 +7,8 @@
* https://gcc.gnu.org/onlinedocs/gcc/Typeof.html
*/
/* lint1-extra-flags: -X 351 */
void take_double(typeof(0.0));
void take_function_double_returning_double(

View File

@ -1,4 +1,4 @@
/* $NetBSD: init.c,v 1.14 2023/01/04 06:04:07 rillig Exp $ */
/* $NetBSD: init.c,v 1.15 2023/03/28 14:44:34 rillig Exp $ */
# 3 "init.c"
/*
@ -7,6 +7,8 @@
* C99 6.7.8
*/
/* lint1-extra-flags: -X 351 */
/*
* C99 does not allow empty initializer braces syntactically.
* Lint allows this syntactically, it just complains if the resulting

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_c90.c,v 1.4 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: init_c90.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "init_c90.c"
/*
@ -7,7 +7,7 @@
* C90 3.5.7
*/
/* lint1-flags: -sw */
/* lint1-flags: -sw -X 351 */
struct point {
int x, y;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex_char.c,v 1.6 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: lex_char.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */
# 3 "lex_char.c"
/*
@ -7,6 +7,8 @@
* C99 6.4.4.4 "Character constants"
*/
/* lint1-extra-flags: -X 351 */
void sink(char);
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex_char_uchar.c,v 1.4 2021/08/21 11:50:57 rillig Exp $ */
/* $NetBSD: lex_char_uchar.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "lex_char_uchar.c"
/*
@ -7,6 +7,7 @@
*/
/* lint1-only-if: uchar */
/* lint1-extra-flags: -X 351 */
/*
* Before inittyp.c 1.23 from 2021-06-29, the following initialization

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex_floating.c,v 1.3 2023/02/18 14:32:32 rillig Exp $ */
/* $NetBSD: lex_floating.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "lex_floating.c"
/*
@ -7,6 +7,8 @@
* C99 6.4.4.2 "Floating constants"
*/
/* lint1-extra-flags: -X 351 */
void sinkf(float);
void sinkd(double);
void sinkl(long double);

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex_integer.c,v 1.10 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: lex_integer.c,v 1.11 2023/03/28 14:44:34 rillig Exp $ */
# 3 "lex_integer.c"
/*
@ -8,6 +8,7 @@
*/
/* lint1-only-if: lp64 */
/* lint1-extra-flags: -X 351 */
long signed_long;
unsigned long long unsigned_long_long_var;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex_integer_binary.c,v 1.2 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: lex_integer_binary.c,v 1.3 2023/03/28 14:44:34 rillig Exp $ */
# 3 "lex_integer_binary.c"
/*
@ -8,7 +8,7 @@
*/
/* Remove the default -g flag. */
/* lint1-flags: -Ac11 -w */
/* lint1-flags: -Ac11 -w -X 351 */
void sink(unsigned int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex_integer_ilp32.c,v 1.7 2023/02/19 11:50:29 rillig Exp $ */
/* $NetBSD: lex_integer_ilp32.c,v 1.8 2023/03/28 14:44:34 rillig Exp $ */
# 3 "lex_integer_ilp32.c"
/*
@ -8,6 +8,7 @@
*/
/* lint1-only-if: ilp32 */
/* lint1-extra-flags: -X 351 */
void sinki(int);
void sinku(unsigned int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex_string.c,v 1.5 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: lex_string.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "lex_string.c"
/*
@ -7,6 +7,8 @@
* C99 6.4.5 "String literals"
*/
/* lint1-extra-flags: -X 351 */
void sink(const char *);
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex_wide_char.c,v 1.3 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: lex_wide_char.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "lex_wide_char.c"
/*
@ -7,6 +7,8 @@
* C99 6.4.4.4 "Character constants"
*/
/* lint1-extra-flags: -X 351 */
void sink(int);
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex_wide_string.c,v 1.3 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: lex_wide_string.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "lex_wide_string.c"
/*
@ -7,6 +7,8 @@
* C99 6.4.5 "String literals"
*/
/* lint1-extra-flags: -X 351 */
void sink(const int *);
void

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_000.c,v 1.4 2022/06/15 20:18:31 rillig Exp $ */
/* $NetBSD: msg_000.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_000.c"
// Test for message: empty declaration [0]
/* lint1-extra-flags: -X 351 */
extern int extern_declared;
/* expect+1: warning: empty declaration [0] */

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_001.c,v 1.8 2022/10/01 09:42:40 rillig Exp $ */
/* $NetBSD: msg_001.c,v 1.9 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_001.c"
// Test for message: old-style declaration; add 'int' [1]
/* lint1-extra-flags: -X 351 */
/* expect+1: warning: old-style declaration; add 'int' [1] */
old_style = 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg_001_c90.c,v 1.2 2022/10/01 09:42:40 rillig Exp $ */
/* $NetBSD: msg_001_c90.c,v 1.3 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_001_c90.c"
/*
@ -8,7 +8,7 @@
* warning.
*/
/* lint1-flags: -s */
/* lint1-flags: -s -X 351 */
/* expect+1: error: old-style declaration; add 'int' [1] */
implicit_global_variable;

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_002.c,v 1.5 2021/07/14 20:39:13 rillig Exp $ */
/* $NetBSD: msg_002.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_002.c"
// Test for message: empty declaration [2]
/* lint1-extra-flags: -X 351 */
/* expect+1: warning: empty declaration [2] */
int;

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_004.c,v 1.6 2022/06/15 20:18:31 rillig Exp $ */
/* $NetBSD: msg_004.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_004.c"
// Test for message: illegal type combination [4]
/* lint1-extra-flags: -X 351 */
// Lint does not detect "two or more data types", but GCC does.
signed double signed_double;

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_006.c,v 1.5 2022/06/15 20:18:31 rillig Exp $ */
/* $NetBSD: msg_006.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_006.c"
// Test for message: use 'double' instead of 'long float' [6]
/* lint1-extra-flags: -X 351 */
/* expect+2: warning: use 'double' instead of 'long float' [6] */
/* expect+1: error: illegal type combination [4] */
long float x;

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_007.c,v 1.5 2022/10/01 09:42:40 rillig Exp $ */
/* $NetBSD: msg_007.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_007.c"
// Test for message: only one storage class allowed [7]
/* lint1-extra-flags: -X 351 */
/* expect+1: error: only one storage class allowed [7] */
extern static void example(void);

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_009.c,v 1.4 2022/06/15 20:18:31 rillig Exp $ */
/* $NetBSD: msg_009.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_009.c"
// Test for message: only register valid as formal parameter storage class [9]
/* lint1-extra-flags: -X 351 */
/* expect+1: error: only register valid as formal parameter storage class [9] */
extern void typedef_example(typedef int param);
/* expect+1: error: only register valid as formal parameter storage class [9] */

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_010.c,v 1.5 2022/04/30 20:24:57 rillig Exp $ */
/* $NetBSD: msg_010.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_010.c"
// Test for message: duplicate '%s' [10]
/* lint1-extra-flags: -X 351 */
/* expect+1: warning: duplicate 'inline' [10] */
inline inline void
double_inline(void)

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_013.c,v 1.4 2022/06/11 12:24:00 rillig Exp $ */
/* $NetBSD: msg_013.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_013.c"
// Test for message: incomplete enum type '%s' [13]
/* lint1-extra-flags: -X 351 */
enum tag;
/* XXX: why '<unnamed>'? */

View File

@ -1,9 +1,11 @@
/* $NetBSD: msg_014.c,v 1.7 2022/05/12 00:18:35 rillig Exp $ */
/* $NetBSD: msg_014.c,v 1.8 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_014.c"
// Test for message: compiler takes alignment of function [14]
/* This message is not used. */
/* lint1-extra-flags: -X 351 */
typedef void function(void);
/* expect+1: error: cannot take size/alignment of function type 'function(void) returning void' [144] */

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_015.c,v 1.4 2022/04/01 22:07:23 rillig Exp $ */
/* $NetBSD: msg_015.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_015.c"
// Test for message: function returns illegal type '%s' [15]
/* lint1-extra-flags: -X 351 */
typedef int array[5];
/* expect+1: error: function returns illegal type 'array[5] of int' [15] */

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_016.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */
/* $NetBSD: msg_016.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_016.c"
// Test for message: array of function is illegal [16]
/* lint1-extra-flags: -X 351 */
typedef void function(void);
/* expect+1: error: array of function is illegal [16] */

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_017.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */
/* $NetBSD: msg_017.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_017.c"
// Test for message: null dimension [17]
/* lint1-extra-flags: -X 351 */
/* expect+1: warning: empty array declaration for 'empty_array_var' [190] */
int empty_array_var[0];

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_018.c,v 1.5 2022/06/22 19:23:18 rillig Exp $ */
/* $NetBSD: msg_018.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_018.c"
// Test for message: illegal use of 'void' [18]
/* lint1-extra-flags: -X 351 */
/* expect+1: error: void type for 'x' [19] */
void x;

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_019.c,v 1.6 2022/06/20 21:13:36 rillig Exp $ */
/* $NetBSD: msg_019.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_019.c"
// Test for message: void type for '%s' [19]
/* lint1-extra-flags: -X 351 */
/* expect+1: error: void type for 'global_variable' [19] */
void global_variable;

View File

@ -1,7 +1,9 @@
/* $NetBSD: msg_020.c,v 1.3 2021/08/27 20:16:50 rillig Exp $ */
/* $NetBSD: msg_020.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_020.c"
// Test for message: negative array dimension (%d) [20]
/* lint1-extra-flags: -X 351 */
/* expect+1: error: negative array dimension (-3) [20] */
int array[-3];

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_022.c,v 1.5 2022/10/01 09:42:40 rillig Exp $ */
/* $NetBSD: msg_022.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_022.c"
// Test for message: incomplete or misplaced function definition [22]
/* lint1-extra-flags: -X 351 */
/*
* Before decl.c 1.264 and func.c 1.130 from 2022-04-02, lint ran into
* assertion failures after trying to recover from the below syntax error.

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_024.c,v 1.4 2022/06/19 11:50:42 rillig Exp $ */
/* $NetBSD: msg_024.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_024.c"
// Test for message: cannot initialize function '%s' [24]
/* lint1-extra-flags: -X 351 */
typedef void (function)(void);
void

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_026.c,v 1.4 2022/06/19 11:50:42 rillig Exp $ */
/* $NetBSD: msg_026.c,v 1.5 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_026.c"
// Test for message: cannot initialize extern declaration '%s' [26]
/* lint1-extra-flags: -X 351 */
/* expect+1: warning: cannot initialize extern declaration 'used' [26] */
extern int used = 1;
int defined = 1;

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_027.c,v 1.7 2022/06/11 12:24:00 rillig Exp $ */
/* $NetBSD: msg_027.c,v 1.8 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_027.c"
// Test for message: redeclaration of '%s' [27]
/* lint1-extra-flags: -X 351 */
extern int identifier(void);
/* expect+1: error: redeclaration of 'identifier' with type 'function(void) returning double', expected 'function(void) returning int' [347] */

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_029.c,v 1.5 2022/06/19 11:50:42 rillig Exp $ */
/* $NetBSD: msg_029.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_029.c"
// Test for message: '%s' was previously declared extern, becomes static [29]
/* lint1-extra-flags: -X 351 */
extern int function(void);
static int function(void)

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_031.c,v 1.8 2022/06/17 18:54:53 rillig Exp $ */
/* $NetBSD: msg_031.c,v 1.9 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_031.c"
// Test for message: '%s' has incomplete type '%s' [31]
/* lint1-extra-flags: -X 351 */
struct complete {
int dummy;
};

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_038.c,v 1.3 2021/08/27 20:16:50 rillig Exp $ */
/* $NetBSD: msg_038.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_038.c"
// Test for message: function illegal in structure or union [38]
/* lint1-extra-flags: -X 351 */
typedef void (function)(void);
struct {

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg_040.c,v 1.3 2022/04/05 23:09:19 rillig Exp $ */
/* $NetBSD: msg_040.c,v 1.4 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_040.c"
// Test for message: unknown size: %s [40]
@ -6,4 +6,4 @@
/* lint1-flags: -Sw */
int var;
typedef int dummy;

View File

@ -1,8 +1,10 @@
/* $NetBSD: msg_044.c,v 1.5 2022/06/20 21:13:36 rillig Exp $ */
/* $NetBSD: msg_044.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */
# 3 "msg_044.c"
// Test for message: declaration of '%s %s' introduces new type in ANSI C [44]
/* lint1-extra-flags: -X 351 */
/* expect+1: warning: struct 'tag' never defined [233] */
struct tag;

Some files were not shown because too many files have changed in this diff Show More