From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings Date: Sat, 28 Jan 2017 09:31:37 -0500 Message-ID: <87o9yrs1bq.fsf@users.sourceforge.net> References: <878tpw1bml.fsf@engster.org> <83wpdfzmcg.fsf@gnu.org> <87ziibzigh.fsf@engster.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1485613881 5767 195.159.176.226 (28 Jan 2017 14:31:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 28 Jan 2017 14:31:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 25556@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 28 15:31:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXU21-0000Cz-6Q for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jan 2017 15:31:09 +0100 Original-Received: from localhost ([::1]:52072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXU23-0000tE-6k for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jan 2017 09:31:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXU1x-0000t1-Eh for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 09:31:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXU1u-0004gE-Cs for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 09:31:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50665) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cXU1u-0004gA-99 for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 09:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cXU1u-0000j0-1O for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 09:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Jan 2017 14:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25556 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25556-submit@debbugs.gnu.org id=B25556.14856138362756 (code B ref 25556); Sat, 28 Jan 2017 14:31:01 +0000 Original-Received: (at 25556) by debbugs.gnu.org; 28 Jan 2017 14:30:36 +0000 Original-Received: from localhost ([127.0.0.1]:48864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXU1U-0000iN-Iq for submit@debbugs.gnu.org; Sat, 28 Jan 2017 09:30:36 -0500 Original-Received: from mail-io0-f175.google.com ([209.85.223.175]:33364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXU1S-0000i6-Io for 25556@debbugs.gnu.org; Sat, 28 Jan 2017 09:30:35 -0500 Original-Received: by mail-io0-f175.google.com with SMTP id v96so80318730ioi.0 for <25556@debbugs.gnu.org>; Sat, 28 Jan 2017 06:30:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=x3Oko2e3GimLYjQNuvEqp51bnhvHJSaohGafyu7HbV0=; b=qNPY4jcfeX6T2l6PdSUFazAr2AG87PmuCPWM1OZLwGdUT3McU4SrKcrSDOP3U5NQNy RtvGrPJRSayGQMUNNAq1Xx4EXsCpwQ7EfveyBFHl+Rrwg8K/c8x8BCD0BmTWZuYSGq6R RgL0ehEfAZyHb8TBbqmfbU+boo61SfTgjIg09DzTgRmR6IC6W60wQwSGX1Q7859Qaawj NGtQn2ePqlHI+JznHVCWigkrvuNGU4sKezcGXFloL/BR7H7H0P7aUxCNN+j4d4Y1OD7X M5N9aw32TqEdoBtsgdROyA9Yxo9JJQ6RVxgtCiDtpBAsJM7fPfovYE/3KnW8sJNV7qo2 iqlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=x3Oko2e3GimLYjQNuvEqp51bnhvHJSaohGafyu7HbV0=; b=tKydalF3fOAlMVWUkQ0Lhq3aFPDyqNsc6E0RGk7fykVYsbnYTJTgBaeth+ht93R6Ug Q3Uiww0tQj5Csi4Hk7vSMPnz+GieO2pwK1EZ0qWtS0yEQKQU9noD+XWKrEBG7sij+sqM iUY6faXfOe4eDuNThFyYx8L5AMy00B274IZFuiQRG3yBzHsuqW4qgo4YmHtbcwfZb2yL +5XQ/Nhi7cSTgvsdGF9q0AusOtCY/IH72awwZWsKMKjf08ZRpQXj1GPuuI7QsjNVj+Jh TqmxAT2QH2bZvCVklylUtyiz03OspgGe5cNSlzLzj9b2yMabtXolQKBg5d73firy+x0C Gdlg== X-Gm-Message-State: AIkVDXIOrHFl+MtqytDOJGq55DMSI5653jn1ziteQJDt5vKOqxcusEQrSFNROe5/zx3VPg== X-Received: by 10.107.202.135 with SMTP id a129mr12102598iog.129.1485613828876; Sat, 28 Jan 2017 06:30:28 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id u63sm5089895ioi.4.2017.01.28.06.30.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Jan 2017 06:30:28 -0800 (PST) In-Reply-To: <87ziibzigh.fsf@engster.org> (David Engster's message of "Sat, 28 Jan 2017 09:39:42 +0100") 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: 208.118.235.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:128717 Archived-At: David Engster writes: > Eli Zaretskii writes: >>> From: David Engster >>> Date: Fri, 27 Jan 2017 21:38:58 +0100 >>>=20 >> >>> I'm currently trying to fix compiler warnings during the CEDET compile >>> in Emacs master, but there's one annoying problem I'm unsure how to >>> fix. Whenever a file does (require 'eieio), and EIEIO is not yet >>> byte-compiled, those two warnings are issued: >>>=20 >>> ../../emacs-lisp/eieio.el: =E2=80=98eieio-object-name-string=E2=80=99 i= s an obsolete >>> generic function (as of 25.1); use =E2=80=98eieio-named=E2=80=99 instea= d. >>> ../../emacs-lisp/eieio.el: =E2=80=98destructor=E2=80=99 is an obsolete = generic >>> function (as of 26.1). >>>=20 >>> Since EIEIO is compiled pretty late, one is flooded with these warnings >>> when compiling Emacs master. The warnings seems to come from the >>> cl-defgeneric for `eieio-object-name-string' and `destructor'. How can >>> this be dealt with? >> >> Is it possibel to arrange that these files be compiled sooner? We >> already have some targets for similar purposes in lisp/Makefile. > > I'm sure that's possible, but why does the file that declares those > constructs obsolete *itself* throw these warnings? I was hoping that > this could be fixed instead. I'm not sure about `eieio-object-name-string', but the message about `destructor' is because cl-defgeneric makes the declaration handling code run before the function defining code, so the symbol is declared obsolete before it's defined and the definition itself triggers the obsolete warning. The patch below moves it around and stops the `destructor' warning: --- i/lisp/emacs-lisp/cl-generic.el +++ w/lisp/emacs-lisp/cl-generic.el @@ -226,7 +226,13 @@ cl-defgeneric (when (eq 'setf (car-safe name)) (require 'gv) (setq name (gv-setter (cadr name)))) - `(progn + `(prog1 + (progn + (defalias ',name + (cl-generic-define ',name ',args ',(nreverse options)) + ,(help-add-fundoc-usage doc args)) + ,@(mapcar (lambda (method) `(cl-defmethod ,name ,@method)) + (nreverse methods))) ,@(mapcar (lambda (declaration) (let ((f (cdr (assq (car declaration) defun-declarations-alist)))) @@ -235,12 +241,7 @@ cl-defgeneric (t (message "Warning: Unknown defun property `%S' in= %S" (car declaration) name) nil)))) - (cdr declarations)) - (defalias ',name - (cl-generic-define ',name ',args ',(nreverse options)) - ,(help-add-fundoc-usage doc args)) - ,@(mapcar (lambda (method) `(cl-defmethod ,name ,@method)) - (nreverse methods))))) + (cdr declarations))))) =20 ;;;###autoload (defun cl-generic-define (name args options)