From acm@muc.de Thu Feb 5 03:17:34 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 5 Feb 2009 11:17:35 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: ** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=2.0 required=4.0 tests=SUBENDNUM autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n15BH6bU028429 for ; Thu, 5 Feb 2009 03:17:08 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LV2EE-0004vO-5l for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 06:17:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LV2ED-0004uw-4Y for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 06:17:05 -0500 Received: from [199.232.76.173] (port=47664 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LV2EC-0004up-Tg for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 06:17:04 -0500 Received: from colin.muc.de ([193.149.48.1]:2598 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LV2EC-0001tz-9W for bug-gnu-emacs@gnu.org; Thu, 05 Feb 2009 06:17:04 -0500 Received: (qmail 50917 invoked by uid 3782); 5 Feb 2009 11:16:55 -0000 Received: from acm.muc.de (pD9E53C4F.dip.t-dialin.net [217.229.60.79]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Thu, 05 Feb 2009 12:16:53 +0100 Received: (qmail 3339 invoked by uid 1000); 5 Feb 2009 11:36:45 -0000 Date: Thu, 5 Feb 2009 11:36:45 +0000 To: bug-gnu-emacs@gnu.org Subject: C Mode: C-M-a fails at BOD re_comp, src/regex.c L6534 Message-ID: <20090205113645.GA3213@muc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 In .../src/regex.c put point at BOL6534, "char *" here: } WEAK_ALIAS (__re_compile_pattern, re_compile_pattern) ^L /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; char * <================================= # ifdef _LIBC /* Make these definitions weak in libc, so POSIX programs can redefine these names if they don't use our functions, and still use regcomp/regexec below without link errors. */ weak_function # endif re_comp (s) const char *s; { Do C-M-a. Point doesn't move. Preliminary investigation: With point on the 'h' of "char *", (c-beginning-of-decl-1 nil) should move point one character backwards. Instead, it moves to BOL "WEAK_ALIAS". -- Alan Mackenzie (Nuremberg, Germany). From rgm@gnu.org Sun Feb 8 18:20:57 2009 Received: (at control) by emacsbugs.donarmstrong.com; 9 Feb 2009 02:20:57 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n192Koqb010146 for ; Sun, 8 Feb 2009 18:20:51 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LWLjb-0000qf-1R; Sun, 08 Feb 2009 21:18:55 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18831.37518.960319.726925@fencepost.gnu.org> Date: Sun, 8 Feb 2009 21:18:54 -0500 From: Glenn Morris To: control Subject: control message reassign 2203 emacs,cc-mode severity 2240 wishlist reassign 2239 emacs,ns merge 2239 2218 From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 15 15:40:45 2016 Received: (at 2203) by debbugs.gnu.org; 15 Jan 2016 20:40:45 +0000 Received: from localhost ([127.0.0.1]:50214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKBAq-0008Rd-Vl for submit@debbugs.gnu.org; Fri, 15 Jan 2016 15:40:45 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:38440) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKBAo-0008RR-LX for 2203@debbugs.gnu.org; Fri, 15 Jan 2016 15:40:43 -0500 Received: by mail-wm0-f52.google.com with SMTP id b14so42239337wmb.1 for <2203@debbugs.gnu.org>; Fri, 15 Jan 2016 12:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=TOtgMlOX/Yuef42n0EsbBFllmkXPyot4SV9D3mZInZE=; b=dLdnzKW0j3bC2M/yKRijvOzexpUfRdmyDhvSrBcuppRkaPhFA3roj0MBoB0DW5FcFG XAz8ZmmD5PiBmLLoKjnjaoJnbm6C1G0luCMnft3FTzW4dkjnG1uzZR6p9bkRh4dR9P7S rZchViLvaqvV4HgCTNXRem7nOffV5rcj69I52m5TaNqft1MCQUamDDbpyMEHbU5RtPKc fBK4DFIeNrai5J0kqSDf5DqCfa9bkivzXFWRZYmhJfan2maKW9aAwVUxIjRzvBlVL6El MMIfL7ClqxuqE4lGQVplZTM9OHZteZsgB6RZ9yqa7gDbSP+SKGj0kvboAJb3romqAC0H RfnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=TOtgMlOX/Yuef42n0EsbBFllmkXPyot4SV9D3mZInZE=; b=WKMGhN+LjYtwtY1d9NnBpBYJ6qcfVd53DehuWJnZ5eYMsW6Y3Ipu4xAvDmiOJwxJIR CxQlusgRSDDzrbgp4kMPP2fdURpQ3i1ha1HPPH4RNTkms04JWZwrL2akm/XwoxiIx1/I UhP+YRqwPnj1GCrxz+HMbpBvWOkfVTVDyvTP8KcWi4l9+VAPDHGXOXL9/AxRgJnKXazc huqtIgQrIuqedrwKe7i76O6Lh9zWFea7Od4uYf9I6o8ElFAShMst1a9g8bLKlKU0yqYe 5z/iPFwkVMlIZOywKUpAOSSjgRhFR3JJGd4HEeg/aBf6MjNe5NRVU2tNtGKe/ZPRLgMc oG4Q== X-Gm-Message-State: AG10YORI7SNrI9MSvYtNzKYpoCGggww+tBvPdMdNbciP7UDOJAnGXS8DhmUgQo1aBAsfJQ== X-Received: by 10.28.184.76 with SMTP id i73mr497619wmf.43.1452890436968; Fri, 15 Jan 2016 12:40:36 -0800 (PST) Received: from galloway.idiocy.org (f.6.f.c.e.8.c.b.d.8.7.9.4.d.0.0.9.2.1.8.8.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:3f8:8129:d4:978d:bc8e:cf6f]) by smtp.gmail.com with ESMTPSA id r10sm12110974wjz.24.2016.01.15.12.40.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jan 2016 12:40:35 -0800 (PST) From: Alan J Third To: 2203@debbugs.gnu.org Subject: Re: bug#2203: C Mode: C-M-a fails at BOD re_comp, src/regex.c L6534 In-Reply-To: <20090205113645.GA3213@muc.de> (Alan Mackenzie's message of "Thu, 5 Feb 2009 11:36:45 +0000") References: <20090205113645.GA3213@muc.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Date: Fri, 15 Jan 2016 20:40:31 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 2203 Cc: Alan Mackenzie X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Alan Mackenzie writes: > In .../src/regex.c put point at BOL6534, "char *" here: > > } > WEAK_ALIAS (__re_compile_pattern, re_compile_pattern) > ^L > /* Entry points compatible with 4.2 BSD regex library. We don't define > them unless specifically requested. */ > > #if defined _REGEX_RE_COMP || defined _LIBC > > /* BSD has one and only one pattern buffer. */ > static struct re_pattern_buffer re_comp_buf; > > char * <================================= > # ifdef _LIBC > /* Make these definitions weak in libc, so POSIX programs can redefine > these names if they don't use our functions, and still use > regcomp/regexec below without link errors. */ > weak_function > # endif > re_comp (s) > const char *s; > { > > > Do C-M-a. Point doesn't move. > > Preliminary investigation: With point on the 'h' of "char *", > (c-beginning-of-decl-1 nil) should move point one character backwards. > Instead, it moves to BOL "WEAK_ALIAS". I just tested this in Emacs 25 and it seems that in every case point moves back to "WEAK_ALIAS". That is, C-M-a, c-beginning-of-defun, behaves the same way as (c-beginning-of-decl-1 nil). I guess that makes it more broken, if more consistent, than when the bug was raised. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 17 17:31:17 2016 Received: (at 2203) by debbugs.gnu.org; 17 Jan 2016 22:31:18 +0000 Received: from localhost ([127.0.0.1]:52150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKvqv-0002TR-Ib for submit@debbugs.gnu.org; Sun, 17 Jan 2016 17:31:17 -0500 Received: from mail.muc.de ([193.149.48.3]:37849) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aKvqt-0002Pe-Dx for 2203@debbugs.gnu.org; Sun, 17 Jan 2016 17:31:16 -0500 Received: (qmail 33669 invoked by uid 3782); 17 Jan 2016 22:31:14 -0000 Date: 17 Jan 2016 22:31:14 -0000 Message-ID: <20160117223114.33668.qmail@mail.muc.de> From: Alan Mackenzie To: Alan J Third Subject: Re: bug#2203: C Mode: C-M-a fails at BOD re_comp, src/regex.c L6534 Organization: muc.de e.V. In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.2-RELEASE-p9 (amd64)) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 2203 Cc: 2203@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Alan. In article you wrote: > Alan Mackenzie writes: >> In .../src/regex.c put point at BOL6534, "char *" here: >> >> } >> WEAK_ALIAS (__re_compile_pattern, re_compile_pattern) >> ^L >> /* Entry points compatible with 4.2 BSD regex library. We don't define >> them unless specifically requested. */ >> >> #if defined _REGEX_RE_COMP || defined _LIBC >> >> /* BSD has one and only one pattern buffer. */ >> static struct re_pattern_buffer re_comp_buf; >> >> char * <================================= >> # ifdef _LIBC >> /* Make these definitions weak in libc, so POSIX programs can redefine >> these names if they don't use our functions, and still use >> regcomp/regexec below without link errors. */ >> weak_function >> # endif >> re_comp (s) >> const char *s; >> { >> >> >> Do C-M-a. Point doesn't move. >> >> Preliminary investigation: With point on the 'h' of "char *", >> (c-beginning-of-decl-1 nil) should move point one character backwards. >> Instead, it moves to BOL "WEAK_ALIAS". > I just tested this in Emacs 25 and it seems that in every case point > moves back to "WEAK_ALIAS". That is, C-M-a, c-beginning-of-defun, > behaves the same way as (c-beginning-of-decl-1 nil). > I guess that makes it more broken, if more consistent, than when the bug > was raised. What is happening is that CC Mode is spuriously recognising WEAK_ALIAS as an old style "K&R" declaration[*], the line static struct re_pattern_buffer re_comp_buf; being a "type declaration for the parameter re_comp_buf". I'm tightening up the detection of K&R declarations such that in each putative type declaration of an identifier, that identifier must also appear inside the function's arglist. [*] A K&R declaration in C is one looking like this: static PyObject ** unpack_sequence(v, argcnt, why) PyObject **v; int argcnt; enum why_code *why; { rather than the now ubiquitous modern form: static PyObject ** unpack_sequence (PyObject **v, int argcnt, enum why_comde *why) { > Alan Third -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 22 18:06:50 2016 Received: (at 2203-done) by debbugs.gnu.org; 22 Jan 2016 23:06:50 +0000 Received: from localhost ([127.0.0.1]:58168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMkn4-0004Sr-Jv for submit@debbugs.gnu.org; Fri, 22 Jan 2016 18:06:50 -0500 Received: from mail.muc.de ([193.149.48.3]:47539) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMkn2-0004Sc-Ji for 2203-done@debbugs.gnu.org; Fri, 22 Jan 2016 18:06:49 -0500 Received: (qmail 52788 invoked by uid 3782); 22 Jan 2016 23:06:47 -0000 Date: 22 Jan 2016 23:06:47 -0000 Message-ID: <20160122230647.52787.qmail@mail.muc.de> From: Alan Mackenzie To: 2203-done@debbugs.gnu.org Subject: Re: bug#2203: C Mode: C-M-a fails at BOD re_comp, src/regex.c L6534 Organization: muc.de e.V. In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.2-RELEASE-p9 (amd64)) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 2203-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Bug fixed in branch emacs-25. In article you wrote: > Alan Mackenzie writes: >> In .../src/regex.c put point at BOL6534, "char *" here: >> >> } >> WEAK_ALIAS (__re_compile_pattern, re_compile_pattern) >> ^L >> /* Entry points compatible with 4.2 BSD regex library. We don't define >> them unless specifically requested. */ >> >> #if defined _REGEX_RE_COMP || defined _LIBC >> >> /* BSD has one and only one pattern buffer. */ >> static struct re_pattern_buffer re_comp_buf; >> >> char * <================================= >> # ifdef _LIBC >> /* Make these definitions weak in libc, so POSIX programs can redefine >> these names if they don't use our functions, and still use >> regcomp/regexec below without link errors. */ >> weak_function >> # endif >> re_comp (s) >> const char *s; >> { >> >> >> Do C-M-a. Point doesn't move. >> >> Preliminary investigation: With point on the 'h' of "char *", >> (c-beginning-of-decl-1 nil) should move point one character backwards. >> Instead, it moves to BOL "WEAK_ALIAS". > I just tested this in Emacs 25 and it seems that in every case point > moves back to "WEAK_ALIAS". That is, C-M-a, c-beginning-of-defun, > behaves the same way as (c-beginning-of-decl-1 nil). > I guess that makes it more broken, if more consistent, than when the bug > was raised. > -- > Alan Third -- Alan Mackenzie (Nuremberg, Germany). From unknown Wed Aug 20 01:18:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Feb 2016 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator