Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: warn about function definitions wi...



details:   https://anonhg.NetBSD.org/src/rev/3b661c23eeae
branches:  trunk
changeset: 377339:3b661c23eeae
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jul 07 19:45:22 2023 +0000

description:
lint: warn about function definitions without header declaration

The existing warning was only issued for function declarations, not for
function definitions.

The interesting change in the tests is in msg_351.c.  Many other tests
use non-static functions due to their syntactic brevity.  In these
tests, the warning is disabled individually, to allow new functions to
be added without generating warning 351.

diffstat:

 tests/usr.bin/xlint/lint1/c11_atomic.c                   |   4 ++--
 tests/usr.bin/xlint/lint1/c11_generic_expression.c       |   5 +++--
 tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c   |   4 ++--
 tests/usr.bin/xlint/lint1/d_alignof.c                    |   4 +++-
 tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c |   4 +++-
 tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c       |   4 +++-
 tests/usr.bin/xlint/lint1/d_c99_union_cast.c             |   4 ++--
 tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c       |   4 +++-
 tests/usr.bin/xlint/lint1/d_compound_literals1.c         |   4 +++-
 tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c         |   4 +++-
 tests/usr.bin/xlint/lint1/d_fold_test.c                  |   2 ++
 tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c   |   4 +++-
 tests/usr.bin/xlint/lint1/d_gcc_func.c                   |   4 +++-
 tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c    |   5 ++++-
 tests/usr.bin/xlint/lint1/d_init_pop_member.c            |   4 +++-
 tests/usr.bin/xlint/lint1/d_long_double_int.c            |   4 +++-
 tests/usr.bin/xlint/lint1/d_pr_22119.c                   |   4 +++-
 tests/usr.bin/xlint/lint1/d_return_type.c                |   4 +++-
 tests/usr.bin/xlint/lint1/expr_cast.c                    |   4 ++--
 tests/usr.bin/xlint/lint1/gcc_attribute_aligned.c        |   4 +++-
 tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c           |   4 +++-
 tests/usr.bin/xlint/lint1/gcc_builtin_overflow.c         |   4 ++--
 tests/usr.bin/xlint/lint1/gcc_cast_union.c               |   4 ++--
 tests/usr.bin/xlint/lint1/gcc_stmt_asm.c                 |   4 +++-
 tests/usr.bin/xlint/lint1/gcc_typeof_after_statement.c   |   4 +++-
 tests/usr.bin/xlint/lint1/init_braces.c                  |   4 +++-
 tests/usr.bin/xlint/lint1/msg_003.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_011.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_012.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_021.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_023.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_028.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_030.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_032.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_043.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_050.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_052.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_053.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_057.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_059.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_062.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_063.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_072.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_084.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_092.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_093.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_094.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_096.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_099.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_103.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_104.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_106.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_107.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_108.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_109.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_110.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_113.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_114.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_116.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_117.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_118.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_119.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_120.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_121.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_122.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_125.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_126.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_128.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_132_lp64.c                 |   4 ++--
 tests/usr.bin/xlint/lint1/msg_133.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_136.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_138.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_143.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_144.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_145.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_146.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_149.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_159.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_163.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_164.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_165.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_166.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_167.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_170.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_171.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_174.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_182.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_183.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_184.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_191.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_192.c                      |   6 ++++--
 tests/usr.bin/xlint/lint1/msg_194.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_195.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_200.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_201.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_202.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_205.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_206.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_209.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_211.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_213.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_214.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_215.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_216.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_217.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_223.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_224.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_225.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_228.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_229.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_230.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_231.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_232.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_236.c                      |   9 ++++++++-
 tests/usr.bin/xlint/lint1/msg_237.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_239.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_240.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_244.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_246.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_261.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_267.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_268.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_274.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_275.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_280.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_281.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_283.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_288.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_289.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_290.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_293.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_299.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_300.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_302.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_306.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_307.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_309.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_310.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_311.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_314.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_317.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_318.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_320.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_324.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_328.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_329.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_333.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_335.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_340.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_345.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/msg_350.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_351.c                      |   6 +++---
 tests/usr.bin/xlint/lint1/msg_352.c                      |   4 +++-
 tests/usr.bin/xlint/lint1/msg_353.c                      |   4 ++--
 tests/usr.bin/xlint/lint1/stmt_for.c                     |   4 +++-
 tests/usr.bin/xlint/lint1/stmt_goto.c                    |   4 +++-
 tests/usr.bin/xlint/xlint/t_xlint.sh                     |  15 ++++++++++++---
 usr.bin/xlint/lint1/cgram.y                              |   5 +++--
 usr.bin/xlint/lint1/decl.c                               |  10 ++++++----
 usr.bin/xlint/lint1/externs1.h                           |   3 ++-
 160 files changed, 459 insertions(+), 207 deletions(-)

diffs (truncated from 2564 to 300 lines):

diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/c11_atomic.c
--- a/tests/usr.bin/xlint/lint1/c11_atomic.c    Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/c11_atomic.c    Fri Jul 07 19:45:22 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: c11_atomic.c,v 1.4 2023/07/07 00:20:39 rillig Exp $    */
+/*     $NetBSD: c11_atomic.c,v 1.5 2023/07/07 19:45:22 rillig Exp $    */
 # 3 "c11_atomic.c"
 
 /*
@@ -11,7 +11,7 @@
  *     msg_350.c
  */
 
-/* lint1-extra-flags: -Ac11 */
+/* lint1-extra-flags: -Ac11 -X 351 */
 
 /* C11 6.7.3 "Type qualifiers" */
 typedef _Atomic int atomic_int;
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/c11_generic_expression.c
--- a/tests/usr.bin/xlint/lint1/c11_generic_expression.c        Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/c11_generic_expression.c        Fri Jul 07 19:45:22 2023 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: c11_generic_expression.c,v 1.16 2023/07/07 00:20:39 rillig Exp $       */
+/*     $NetBSD: c11_generic_expression.c,v 1.17 2023/07/07 19:45:22 rillig Exp $       */
 # 3 "c11_generic_expression.c"
 
+/* lint1-extra-flags: -X 351 */
+
 /*
  * C99 added support for type-generic macros, but these were limited to the
  * header <tgmath.h>.  C11 made this feature generally available.
@@ -101,7 +103,6 @@ primary_expression(void)
  * which is then silently ignored by init_expr.  This situation is already
  * covered by the compilers, so there is no need for lint to double-check it.
  */
-/* expect+1: warning: missing 'extern' header declaration for 'x' [351] */
 const char *x = _Generic(
     1ULL + 1.0f,
     int: 1
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c
--- a/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c    Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c    Fri Jul 07 19:45:22 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: c99_bool_strict_suppressed.c,v 1.5 2022/06/19 12:14:34 rillig Exp $    */
+/*     $NetBSD: c99_bool_strict_suppressed.c,v 1.6 2023/07/07 19:45:22 rillig Exp $    */
 # 3 "c99_bool_strict_suppressed.c"
 
 /*
@@ -18,7 +18,7 @@
  * tree.c 1.305 from 2021-07-04.
  */
 
-/* lint1-extra-flags: -T -X 107,330,331,332,333 */
+/* lint1-extra-flags: -T -X 107,330,331,332,333 -X 351 */
 
 /* ARGSUSED */
 void
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_alignof.c
--- a/tests/usr.bin/xlint/lint1/d_alignof.c     Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_alignof.c     Fri Jul 07 19:45:22 2023 +0000
@@ -1,8 +1,10 @@
-/*     $NetBSD: d_alignof.c,v 1.11 2023/06/30 16:39:17 rillig Exp $    */
+/*     $NetBSD: d_alignof.c,v 1.12 2023/07/07 19:45:22 rillig Exp $    */
 # 3 "d_alignof.c"
 
 /* https://gcc.gnu.org/onlinedocs/gcc/Alignment.html */
 
+/* lint1-extra-flags: -X 351 */
+
 unsigned long
 leading_and_trailing_alignof_type(void)
 {
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c
--- a/tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c  Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c  Fri Jul 07 19:45:22 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_c99_compound_literal_comma.c,v 1.3 2021/03/20 11:24:49 rillig Exp $  */
+/*     $NetBSD: d_c99_compound_literal_comma.c,v 1.4 2023/07/07 19:45:22 rillig Exp $  */
 # 3 "d_c99_compound_literal_comma.c"
 
 /*-
@@ -8,6 +8,8 @@
  * C99 6.5.2.5 "Compound literals" for the semantics.
  */
 
+/* lint1-extra-flags: -X 351 */
+
 struct point {
        int x;
        int y;
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c
--- a/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c        Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c        Fri Jul 07 19:45:22 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_c99_decls_after_stmt.c,v 1.5 2023/01/22 17:17:25 rillig Exp $        */
+/*     $NetBSD: d_c99_decls_after_stmt.c,v 1.6 2023/07/07 19:45:22 rillig Exp $        */
 # 3 "d_c99_decls_after_stmt.c"
 
 /*
@@ -8,6 +8,8 @@
  * https://gnats.netbsd.org/45417
  */
 
+/* lint1-extra-flags: -X 351 */
+
 void
 two_groups_of_decl_plus_stmt(void)
 {
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_c99_union_cast.c
--- a/tests/usr.bin/xlint/lint1/d_c99_union_cast.c      Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_union_cast.c      Fri Jul 07 19:45:22 2023 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: d_c99_union_cast.c,v 1.7 2021/08/03 20:57:06 rillig Exp $      */
+/*     $NetBSD: d_c99_union_cast.c,v 1.8 2023/07/07 19:45:22 rillig Exp $      */
 # 3 "d_c99_union_cast.c"
 
 /* C99 does not define union cast, it is a GCC extension. */
 
-/* lint1-flags: -Sw */
+/* lint1-flags: -Sw -X 351 */
 
 struct bar {
        int a;
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c
--- a/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c        Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c        Fri Jul 07 19:45:22 2023 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: d_cast_fun_array_param.c,v 1.3 2021/01/31 14:57:28 rillig Exp $        */
+/*     $NetBSD: d_cast_fun_array_param.c,v 1.4 2023/07/07 19:45:22 rillig Exp $        */
 # 3 "d_cast_fun_array_param.c"
 
+/* lint1-extra-flags: -X 351 */
+
 static void
 f(void *b[4])
 {
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_compound_literals1.c
--- a/tests/usr.bin/xlint/lint1/d_compound_literals1.c  Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_compound_literals1.c  Fri Jul 07 19:45:22 2023 +0000
@@ -1,8 +1,10 @@
-/*     $NetBSD: d_compound_literals1.c,v 1.4 2022/04/24 20:08:23 rillig Exp $  */
+/*     $NetBSD: d_compound_literals1.c,v 1.5 2023/07/07 19:45:22 rillig Exp $  */
 # 3 "d_compound_literals1.c"
 
 /* compound literals */
 
+/* lint1-extra-flags: -X 351 */
+
 struct p {
        short a, b, c, d;
 };
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c
--- a/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c  Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c  Fri Jul 07 19:45:22 2023 +0000
@@ -1,8 +1,10 @@
-/*     $NetBSD: d_ellipsis_in_switch.c,v 1.4 2021/03/27 13:59:18 rillig Exp $  */
+/*     $NetBSD: d_ellipsis_in_switch.c,v 1.5 2023/07/07 19:45:22 rillig Exp $  */
 # 3 "d_ellipsis_in_switch.c"
 
 /* Using a range in a case label is a GCC extension. */
 
+/* lint1-extra-flags: -X 351 */
+
 int
 x(void)
 {
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_fold_test.c
--- a/tests/usr.bin/xlint/lint1/d_fold_test.c   Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_fold_test.c   Fri Jul 07 19:45:22 2023 +0000
@@ -5,6 +5,8 @@
  * truthiness, such as in the condition of an if statement.
  */
 
+/* lint1-extra-flags: -X 351 */
+
 struct s {
        int member;
 };
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c
--- a/tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c    Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c    Fri Jul 07 19:45:22 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_gcc_compound_statements2.c,v 1.5 2022/02/26 20:36:11 rillig Exp $    */
+/*     $NetBSD: d_gcc_compound_statements2.c,v 1.6 2023/07/07 19:45:22 rillig Exp $    */
 # 3 "d_gcc_compound_statements2.c"
 
 /*
@@ -7,6 +7,8 @@
  * https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
  */
 
+/* lint1-extra-flags: -X 351 */
+
 struct cpu_info {
        int bar;
 };
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_gcc_func.c
--- a/tests/usr.bin/xlint/lint1/d_gcc_func.c    Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_gcc_func.c    Fri Jul 07 19:45:22 2023 +0000
@@ -1,8 +1,10 @@
-/*     $NetBSD: d_gcc_func.c,v 1.3 2021/01/31 14:57:28 rillig Exp $    */
+/*     $NetBSD: d_gcc_func.c,v 1.4 2023/07/07 19:45:22 rillig Exp $    */
 # 3 "d_gcc_func.c"
 
 /* gcc __FUNCTION__ */
 
+/* lint1-extra-flags: -X 351 */
+
 void
 foo(const char *p)
 {
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c
--- a/tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c     Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c     Fri Jul 07 19:45:22 2023 +0000
@@ -1,7 +1,10 @@
-/*     $NetBSD: d_gcc_variable_array_init.c,v 1.3 2021/01/31 14:57:28 rillig Exp $     */
+/*     $NetBSD: d_gcc_variable_array_init.c,v 1.4 2023/07/07 19:45:22 rillig Exp $     */
 # 3 "d_gcc_variable_array_init.c"
 
 /* gcc: variable array initializer */
+
+/* lint1-extra-flags: -X 351 */
+
 void
 foo(int i)
 {
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_init_pop_member.c
--- a/tests/usr.bin/xlint/lint1/d_init_pop_member.c     Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_init_pop_member.c     Fri Jul 07 19:45:22 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_init_pop_member.c,v 1.9 2022/01/15 14:22:03 rillig Exp $     */
+/*     $NetBSD: d_init_pop_member.c,v 1.10 2023/07/07 19:45:22 rillig Exp $    */
 # 3 "d_init_pop_member.c"
 
 /*
@@ -8,6 +8,8 @@
  * named initializer.
  */
 
+/* lint1-extra-flags: -X 351 */
+
 struct rgb {
        unsigned red;
        unsigned green;
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_long_double_int.c
--- a/tests/usr.bin/xlint/lint1/d_long_double_int.c     Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_long_double_int.c     Fri Jul 07 19:45:22 2023 +0000
@@ -1,8 +1,10 @@
-/*     $NetBSD: d_long_double_int.c,v 1.5 2022/01/15 14:22:03 rillig Exp $     */
+/*     $NetBSD: d_long_double_int.c,v 1.6 2023/07/07 19:45:22 rillig Exp $     */
 # 3 "d_long_double_int.c"
 
 /* PR bin/39639: writing "long double" gave "long int" */
 
+/* lint1-extra-flags: -X 351 */
+
 int
 fail(long double *a, long int *b)
 {
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_pr_22119.c
--- a/tests/usr.bin/xlint/lint1/d_pr_22119.c    Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_pr_22119.c    Fri Jul 07 19:45:22 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_pr_22119.c,v 1.4 2022/04/01 22:28:21 rillig Exp $    */
+/*     $NetBSD: d_pr_22119.c,v 1.5 2023/07/07 19:45:22 rillig Exp $    */
 # 3 "d_pr_22119.c"
 
 /*
@@ -8,6 +8,8 @@
  * cast is NULL.
 */
 
+/* lint1-extra-flags: -X 351 */
+
 void
 func1(void)
 {
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/d_return_type.c
--- a/tests/usr.bin/xlint/lint1/d_return_type.c Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_return_type.c Fri Jul 07 19:45:22 2023 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: d_return_type.c,v 1.5 2022/06/22 19:23:18 rillig Exp $ */
+/*     $NetBSD: d_return_type.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */
 # 3 "d_return_type.c"
 
+/* lint1-extra-flags: -X 351 */
+
 enum A {
        A
 };
diff -r d263f0037216 -r 3b661c23eeae tests/usr.bin/xlint/lint1/expr_cast.c
--- a/tests/usr.bin/xlint/lint1/expr_cast.c     Fri Jul 07 18:02:52 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/expr_cast.c     Fri Jul 07 19:45:22 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expr_cast.c,v 1.3 2021/08/03 18:44:33 rillig Exp $     */
+/*     $NetBSD: expr_cast.c,v 1.4 2023/07/07 19:45:22 rillig Exp $     */
 # 3 "expr_cast.c"
 
 /*
@@ -12,7 +12,7 @@



Home | Main Index | Thread Index | Old Index