From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 46B541F47C for ; Fri, 6 Jan 2023 12:22:30 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDljY-00082o-Ix; Fri, 06 Jan 2023 07:22:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDljR-00081o-J2; Fri, 06 Jan 2023 07:21:57 -0500 Received: from freefriends.org ([96.88.95.60]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDljO-0005ZZ-TM; Fri, 06 Jan 2023 07:21:56 -0500 X-Envelope-From: arnold@skeeve.com Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 306CL5eG009555 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 6 Jan 2023 05:21:06 -0700 Received: (from arnold@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 306CL3cx009554; Fri, 6 Jan 2023 05:21:03 -0700 From: arnold@skeeve.com Message-Id: <202301061221.306CL3cx009554@freefriends.org> X-Authentication-Warning: frenzy.freefriends.org: arnold set sender to arnold@skeeve.com using -f Date: Fri, 06 Jan 2023 05:21:03 -0700 To: eggert@cs.ucla.edu, arsen@aarsen.me Subject: Re: Clang-built Gawk 5.2.1 regex oddity Cc: sam@gentoo.org, concord@gentoo.org, bug-gnulib@gnu.org, bug-gawk@gnu.org, arnold@skeeve.com References: <20221230000119.hyui6umnspuyzqum@bubbles> <202212300913.2BU9DV6V030160@freefriends.org> <6DADB0FC-87EE-4028-91DF-C93A968A8982@gentoo.org> <202301011906.301J6ROQ018104@freefriends.org> <1cdb3d41-d675-cca1-7498-c3840f2ee8ad@cs.ucla.edu> <87bkncy3vl.fsf@aarsen.me> In-Reply-To: <87bkncy3vl.fsf@aarsen.me> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=96.88.95.60; envelope-from=arnold@skeeve.com; helo=freefriends.org X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Thanks for the update. Paul, let's leave dfa.c as is, with the modified code. It's much easier to read anyway. Thanks, Arnold Arsen Arsenović wrote: > Hi, > > Paul Eggert writes: > > > This is a serious bug in Clang: it generates incorrect machine code. > > > > The code that Clang generates for the following (gawk/support/dfa.c lines > > 1141-1143): > > > > ((dfa->syntax.dfaopts & DFA_CONFUSING_BRACKETS_ERROR > > ? dfaerror : dfawarn) > > (_("character class syntax is [[:space:]], not [:space:]"))); > > > > is immediately followed by the code generated for the following > > (gawk/support/dfa.c line 1015): > > > > dfaerror (_("invalid character class")); > > > > and this is incorrect because the two source code regions are not connected > > with each other. > > This is now fixed in Clang: > https://reviews.llvm.org/rGcf8fd210a35c8e93136cb8edc5c6a2e818dc1b1d > > Happy hacking! > -- > Arsen Arsenović