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: fix documentation about optional b...



details:   https://anonhg.NetBSD.org/src/rev/6bc25761f299
branches:  trunk
changeset: 953900:6bc25761f299
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Mar 23 18:51:43 2021 +0000

description:
lint: fix documentation about optional braces in initializers

diffstat:

 usr.bin/xlint/lint1/init.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r 981fa7fc5d76 -r 6bc25761f299 usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c        Tue Mar 23 18:46:07 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c        Tue Mar 23 18:51:43 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.111 2021/03/23 18:40:50 rillig Exp $        */
+/*     $NetBSD: init.c,v 1.112 2021/03/23 18:51:43 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.111 2021/03/23 18:40:50 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.112 2021/03/23 18:51:43 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -61,10 +61,10 @@
  *     struct { int x, y; } point = { 3, 4 };
  *     struct { int x, y; } point = { .y = 3, .x = 4 };
  *
- * The initializer that follows the '=' may be surrounded by an extra pair of
- * braces, like in the example 'number_with_braces'.  For multi-dimensional
- * arrays, the inner braces may be omitted like in array_flat or spelled out
- * like in array_nested.
+ * Any scalar expression in the initializer may be surrounded by an extra pair
+ * of braces, like in the example 'number_with_braces' (C99 6.7.8p11).  For
+ * multi-dimensional arrays, the inner braces may be omitted like in
+ * array_flat or spelled out like in array_nested.
  *
  * For the initializer, the grammar parser calls these functions:
  *



Home | Main Index | Thread Index | Old Index