From nobody Mon Jun 17 14:35:23 2024 X-Original-To: dev-commits-src-all@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 4W2sqb6LWCz5P0ZR; Mon, 17 Jun 2024 14:35:23 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2sqb5kbyz4w5k; Mon, 17 Jun 2024 14:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718634923; 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=YywvXzNtO4LenKEtBl9hdRqIWKl4/5+l9gDV5OXaLR0=; b=Vgln/n2eh+dM/Nlh5RSxCGdJRD4mJsiAHRTjKh4Dg76F3R5RQ74gGR38pHTYpYiTuahKkc vw6tJABAFVqAHlbx3ziSf71GyT+sWHBxA3SzfRIlKkghopxIrQvcCqK43xAloELT3b9VkF a2wGdqD+zudn/5VgUEizpZRnejRfjCerzpIWQ8hg8CAevlIBNncdFgCgveurEBnxEyKRa9 B7nSd9x43vbYwq541oC3fdEZWicF9yGusOA3OTV1TUi5XNzfp9SDkvpkgHyh2mYYfJ6Oga e5hmSA5/08+bFLIpbkDI1T7Rge8JDsjeYW/u8AvaqlAvOgziRLiugd683scHZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718634923; a=rsa-sha256; cv=none; b=Cnc3U0/wheWUUs/rc6Pj7PDYncqn2+RNFIkZput9G4aWxFscbW8xaTLb/i+qgrTuK6Y5Pt bTm6mVgLj09MoPZE9XX2Yeq2dtCapPMv0SWAAU5dtgo3b8ZDDElYu0WeidkZ2OKmg3pPJk jCrdRrd4D5ggK6RN8MzLCxqWoYBZswnY63VN3TiwakEnDUsFnEG8WynkR5RJThyFEd/06U Uw46hFnAKlGR5AtQxg438GwLKyNIf2yikPA2O9jgqdSwQBYCEIeQv2PjO1CpF6MSBixTZC 9bO+frxfQYvGZAYah3PP7C0jV6pUv9kvtynGzE7KyorGXr92m6FQcBljRBWqqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718634923; 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=YywvXzNtO4LenKEtBl9hdRqIWKl4/5+l9gDV5OXaLR0=; b=SNczyWvZxPtSkPlt9T0Tn/XrRf5+Yhfqb7/gHMa9RT7WtJV5cuYLVKHcuiy+kRlyUfVmUu nrxsIijCVMmXAOSrqffY1ODWqFVrbNlEhOmsCHGhKk288VcO4yT6CBM22XAuRrIORFo/gI mZgtTJSvwap1xMibk8agXlAnz+FKnyhkWDm+aoVg5vhqTeUfbQprKfq8Y94er93ExmH2bq kZjPsO4gbjv94cAxrQjif193+XZ8Lenk1y0chHm1GLsmCZHDDToPx+Qu+38TppF4nT8A+q e1vkySP/hfcYCJ7JtYh1nBh7n13jrQ49xpoUn2vVtx0QAK0QBQCyFNoO1+Emrg== 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 4W2sqb4q8GzKVX; Mon, 17 Jun 2024 14:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45HEZN3p004347; Mon, 17 Jun 2024 14:35:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45HEZNH9004344; Mon, 17 Jun 2024 14:35:23 GMT (envelope-from git) Date: Mon, 17 Jun 2024 14:35:23 GMT Message-Id: <202406171435.45HEZNH9004344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6d451a20ef70 - stable/14 - libdtrace: Work around a warning from flex List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6d451a20ef70b9a0005442924dfd4ceaddd4c2b4 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6d451a20ef70b9a0005442924dfd4ceaddd4c2b4 commit 6d451a20ef70b9a0005442924dfd4ceaddd4c2b4 Author: Mark Johnston AuthorDate: 2024-06-01 15:16:26 +0000 Commit: Mark Johnston CommitDate: 2024-06-17 13:27:24 +0000 libdtrace: Work around a warning from flex When compiling dt_lex.l, flex produces warnings of the form: dt_lex.l:413: warning, trailing context made variable due to preceding '|' action dt_lex.l:412: warning, dangerous trailing context dt_lex.l:412: warning, dangerous trailing context Here, trailing context refers to the use of "$", which expands to "/\n". The meaning behind these warnings is described in the first two paragraphs of the flex manual's DEFICIENCIES/BUGS section: Some trailing context patterns cannot be properly matched and generate warning messages ("dangerous trailing context"). These are patterns where the ending of the first part of the rule matches the beginning of the second part, such as "zx*/xy*", where the 'x*' matches the 'x' at the beginning of the trailing context. (Note that the POSIX draft states that the text matched by such patterns is undefined.) For some trailing context rules, parts which are actually fixed-length are not recognized as such, leading to the above mentioned performance loss. In particular, parts using '|' or {n} (such as "foo{3}") are always considered variable-length. Here, the warnings appear to be bogus in this case. The lexer has no problem matching either of the referenced patterns, e.g., printf("foobar or # 1 "asdfasdf Introduce a small amount of code duplication to silence the warning. MFC after: 2 weeks (cherry picked from commit 4bddff0833d3efee77a099b3ef447fbae1e63d21) --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l index d50369bb57c9..756a48b9c45f 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l @@ -407,7 +407,7 @@ if (yypcb->pcb_token != 0) { {RGX_FP} yyerror("floating-point constants are not permitted\n"); -\"{RGX_STR}$ | +\"{RGX_STR}$ xyerror(D_STR_NL, "newline encountered in string literal"); \"{RGX_STR}$ xyerror(D_STR_NL, "newline encountered in string literal"); \"{RGX_STR}\" |