From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.bugs Subject: bug#38511: etags seems to be confused by macros Date: Fri, 6 Dec 2019 14:20:14 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="255151"; mail-complaints-to="usenet@blaine.gmane.org" To: 38511@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 06 21:31:40 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1idKGI-0014FC-Uq for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Dec 2019 21:31:39 +0100 Original-Received: from localhost ([::1]:45104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idKGH-000055-Bu for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Dec 2019 15:31:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37267) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idKFj-0008Sn-RS for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:31:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idKFi-0002EG-KY for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:31:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1idKFi-0002Cm-Cm for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1idKFi-0007x6-8g for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Skip Montanaro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Dec 2019 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38511 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157566421230492 (code B ref -1); Fri, 06 Dec 2019 20:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Dec 2019 20:30:12 +0000 Original-Received: from localhost ([127.0.0.1]:47093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idKEt-0007vj-Ps for submit@debbugs.gnu.org; Fri, 06 Dec 2019 15:30:12 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:56276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idK5l-0007U5-5r for submit@debbugs.gnu.org; Fri, 06 Dec 2019 15:20:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42576) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idK5k-0005Vj-25 for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:20:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idK5i-0002MB-VM for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:20:43 -0500 Original-Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:33986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1idK5i-0002G1-N0 for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:20:42 -0500 Original-Received: by mail-pf1-x42d.google.com with SMTP id n13so3912029pff.1 for ; Fri, 06 Dec 2019 12:20:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=UC/TOiMYrIyz5sQYKIv04yVXNujICC52R+Ho63TCf+M=; b=pQpspbW3zNrKx19IyqTaJMMOOxOXiPOKw8ZN12pTbglrKVOfX+iyIOYumWRi/gle7x EX3C2ITkYpJC2FOXIy6vhGEosu9oI8fC0xoGPdLxwPFRez3ifBflV58LFCBXSxgwz1Ny FWvzv8g2gAMA4unXpeXFtryCsSg4j5gqm3n4/JhEgaDEJFfs5/jp/UNsSvUTeejfNqCu 31TTYxBDUbVRjc+xKAIsyv8xy0rbq3u2K4gHirqwzD0Dsgs+emToCN7u8rxk3XnuLavy Q/qSmZGCOPOx4TMpti/VooTNYBp8OHg0sG3EJXWPaBljSPdNaP3+PganX+FQK5K6rCTO jcSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=UC/TOiMYrIyz5sQYKIv04yVXNujICC52R+Ho63TCf+M=; b=DO56SRivRAfgiIn/T4Hum4ESbb9mnokUxAiLiun3Qb/uoCcrpi83tIGVGaV+QhOZQo JRrB1UIPKrfVxjcIe3RcEMNfaxBjyyfqMtGsC5RyCiyugUuH95IqaQgpnkAHDIepUd3Y 5svZo0pP/QZ66GwEdeGF/dw8ArrpUsMggZ+6lMtlPKgw3FsuBkbonuSAaAskLlVqptk0 cQzh95HOQESEamMNlAnIIIifzmGKtqGBUYeffIvrwdyWHePJ0pJg9rnVu7MGFxF0Qqvi xVrys2QjBsNm3Ibni3+6nenB+xV6zrgcS5kZMM04R31/heLnlV3i2FRyI7a+udHuZvGx CMzQ== X-Gm-Message-State: APjAAAVQYSzQTiS5c2w6ggW9KjIOUhUsVT92nluxQ8MJ1aOSCClrtTvy kzcp+S3tFoYJXJCUaAUDcE4oC9ADPI69Kb5x2BXJrsMYO0+Fag0= X-Google-Smtp-Source: APXvYqwS4hfzSGeOXyScXNcTWllD1yE4AaZM6Eye0MBmJpNYiGywiNOm0MrDsBGdG0ngxx1sXtwH9jmfUmLr5MR7m5g= X-Received: by 2002:a63:dd16:: with SMTP id t22mr5711875pgg.307.1575663640683; Fri, 06 Dec 2019 12:20:40 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Fri, 06 Dec 2019 15:30:10 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:172981 Archived-At: I use speedbar in Emacs, which relies on etags to generate tag files. The Python source defines a macro named Py_LOCAL_INLINE, which is used to select the appropriate spelling of "static inline": #if defined(_MSC_VER) ... # define Py_LOCAL_INLINE(type) static __inline type __fastcall #else ... # define Py_LOCAL_INLINE(type) static inline type #endif It's used like so: Py_LOCAL_INLINE(void) stackdepth_push(basicblock ***sp, basicblock *b, int depth) { assert(b->b_startdepth < 0 || b->b_startdepth == depth); if (b->b_startdepth < depth && b->b_startdepth < 100) { assert(b->b_startdepth < 0); b->b_startdepth = depth; *(*sp)++ = b; } } It all works well. Etags though, thinks the file contains a function named "Py_LOCAL_INLINE" and completely misses the actual function, "stackdepth_push". Seems like a bug to me, but it's not obvious if there is a trivial fix. As a workaround, I think I can write a little shell script which effectively expands the Py_LOCAL_INLINE macro, then pumps the result to etags. Still, would be kind of nice if this could be fixed. Thanks, Skip Montanaro