From nobody Thu Jun 12 00:29:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bHk0v6wz0z5ykCS; Thu, 12 Jun 2025 00:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bHk0v5hM4z3XGB; Thu, 12 Jun 2025 00:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749688143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jrT2Snf72hl9R/9KAhfa/DEQlhKNoJPLA0Y9whc7+zk=; b=q0JwszuJDlYj0wcE0tMotzMFGN6o09Nk39+U8O6rzfPy0z6WeW3ryqMmZ0EfnU4/u0CZEs IkVtgPf74BxdL/lo4tXbIOrImfcXeamtn00B+zZMNF6B1MfEBoOgeKd6PzUeQYe1VDYp5q c8YfiUvMAHmGeA8cmS4vAyCRT0iNIb6M0xQdg4Pp/VHX6LbNckzS4/rMQOK2VfPkVyNgcJ iq84ZuYLdNInyL6L48j9HnaQhZusYAu9vXvPDhbCtVSzvXTDOG9zqoww2w8ByA+noD/xom zXhvLxXuL4QZcPIRnm0AmNGUmhjkJQ6Unq2/yWNOginY/JXjp2cbKL94QLIQtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749688143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jrT2Snf72hl9R/9KAhfa/DEQlhKNoJPLA0Y9whc7+zk=; b=cGZiEcPhdIH+A0/yRzRZsFzRugfrLQm5pjrk8OaZYjf4rnXuAfZm9T/7SMaI1ZqsBrPxZz 5ghnmRsUmRxoF7dmNGuA+eSiK0RS1TO+xxAiTDDUC1lJT0oTodaCYtX6fOKSVepr7DpxUd FZF95VeX4aVF1pMjUkb7p6AOjQPShUuHprJ1++TTUiabqzAhqUVaIWd8Hn6MGFxuZ1oBov 83PVHsU+PcqqV9rA/q7t5fNKnG9k8Y5YKYKftyFHpIGOAmHogEzKwphrbiENpLI6a+NYYy ykSvsd1i/u8K/TXw82OaAymSVMeP/uGCJ+RhfxZtVzi1um7pGp+I9Gpn3VQ3UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749688143; a=rsa-sha256; cv=none; b=f69c5tKJTWwkVv0MEp4JY+PuwRQGhIvwFle9lU7bWD0ScvuQrWg1FUg8/lN4TAgKZVLEMf 90Zge0Q8Kc0c/wAK9gcopUaY3IHb7Fzw4/XWt9y0iQzgwrjnvsC0hVmqtLc9RuYSEDsy8A V7m8muG13cKaNLzbVs1SDHmH5nGp83ggvjyuCfYkLCL6hgNmjvY4+c9iQevI6OnSFJAPWs IFhQ9rw+I2Ki0iRWM7b/ymew65AWK1gRhJe8YfQfNp6ULLOtLdVoE4ZkN8gexMR104+IYl tJrNRk6SXg4wxD/aujvyyD1cx/Kp4IyMKJ6IFYYV9g56vbjE08tvz/wHOTM8eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bHk0v4wkYzq6B; Thu, 12 Jun 2025 00:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55C0T3di076962; Thu, 12 Jun 2025 00:29:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55C0T39B076960; Thu, 12 Jun 2025 00:29:03 GMT (envelope-from git) Date: Thu, 12 Jun 2025 00:29:03 GMT Message-Id: <202506120029.55C0T39B076960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: daf47b9ec9ed - main - style.9: relax "return (value)" requirement for C++ List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: daf47b9ec9ed360dfdff6769ae4d0c2c16972552 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=daf47b9ec9ed360dfdff6769ae4d0c2c16972552 commit daf47b9ec9ed360dfdff6769ae4d0c2c16972552 Author: Lexi Winter AuthorDate: 2025-03-27 14:23:13 +0000 Commit: Warner Losh CommitDate: 2025-06-12 00:21:44 +0000 style.9: relax "return (value)" requirement for C++ consider the following C++ code: struct S { int a, b; }; S f() { return {1, 2}; } according to style(9), the return statement should be formatted as: return ({1, 2}); however, this is not valid C++ code and will not compile. add an exception to style(9) to cover this case. Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1623 Closes: https://github.com/freebsd/freebsd-src/pull/1623 --- share/man/man9/style.9 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 5542a9685c46..484b4f144b2e 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 18, 2025 +.Dd March 27, 2025 .Dt STYLE 9 .Os .Sh NAME @@ -766,7 +766,8 @@ to any pointer type. .Pp Values in .Ic return -statements should be enclosed in parentheses. +statements should be enclosed in parentheses where possible. +For example, parentheses cannot be used if the value is a C++ braced-init-list. .Pp Use .Xr err 3