Module Name: src Committed By: riastradh Date: Sun Aug 18 12:41:38 UTC 2024
Modified Files: src/lib/libc/locale: c8rtomb.c Log Message: c8rtomb(3): Nix __CTASSERT after case label. I put this in to make it (machine-verifiably) clear that zeroing the state is the same as returning to the initial conversion state, as the standard requires, but this is causing build trouble (and will likely cause more trouble if pulled up) because some definitions of __CTASSERT make a declaration which is forbidden after a label, so let's remove it. PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/locale/c8rtomb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/locale/c8rtomb.c diff -u src/lib/libc/locale/c8rtomb.c:1.5 src/lib/libc/locale/c8rtomb.c:1.6 --- src/lib/libc/locale/c8rtomb.c:1.5 Sun Aug 18 02:19:35 2024 +++ src/lib/libc/locale/c8rtomb.c Sun Aug 18 12:41:38 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: c8rtomb.c,v 1.5 2024/08/18 02:19:35 riastradh Exp $ */ +/* $NetBSD: c8rtomb.c,v 1.6 2024/08/18 12:41:38 riastradh Exp $ */ /*- * Copyright (c) 2024 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: c8rtomb.c,v 1.5 2024/08/18 02:19:35 riastradh Exp $"); +__RCSID("$NetBSD: c8rtomb.c,v 1.6 2024/08/18 12:41:38 riastradh Exp $"); #include "namespace.h" @@ -222,10 +222,6 @@ c8rtomb_l(char *restrict s, char8_t c8, * We have a scalar value. Clear the state and output * the scalar value. */ -#ifndef __lint__ - // XXX: lint does not grok struct decl after case label! - __CTASSERT(UTF8_ACCEPT == 0); -#endif S->state_c32 = 0; return c32rtomb_l(s, c32, &S->mbs, loc); }