From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Nonsensical byte compiler warning. Date: Wed, 04 Apr 2007 12:17:52 +0200 Message-ID: <86bqi430kv.fsf@lola.quinscape.zz> References: <85ps6okoe5.fsf@lola.goethe.zz> <87lkhcj791.fsf@stupidchicken.com> <87tzvwvj6c.fsf@gmx.at> <861wj04qcq.fsf@lola.quinscape.zz> <873b3gpn4u.fsf@gmx.at> <86fy7g34tk.fsf@lola.quinscape.zz> <877issii2y.fsf@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175681892 8204 80.91.229.12 (4 Apr 2007 10:18:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Apr 2007 10:18:12 +0000 (UTC) Cc: acm@muc.de, Chong Yidong , rms@gnu.org, emacs-devel@gnu.org To: Markus Triska Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 04 12:18:04 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HZ2Yy-0006Zo-SC for ged-emacs-devel@m.gmane.org; Wed, 04 Apr 2007 12:18:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZ2cD-0005RA-Q0 for ged-emacs-devel@m.gmane.org; Wed, 04 Apr 2007 06:21:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HZ2c9-0005OX-PY for emacs-devel@gnu.org; Wed, 04 Apr 2007 06:21:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HZ2c8-0005Mb-Bd for emacs-devel@gnu.org; Wed, 04 Apr 2007 06:21:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZ2c8-0005MT-7z for emacs-devel@gnu.org; Wed, 04 Apr 2007 06:21:16 -0400 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HZ2Ys-0004tt-9S for emacs-devel@gnu.org; Wed, 04 Apr 2007 06:17:54 -0400 Original-Received: from quinscape.de (pd95b0fdb.dip0.t-ipconnect.de [217.91.15.219]) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id MAA16900 for ; Wed, 4 Apr 2007 12:17:49 +0200 X-Delivered-To: Original-Received: (qmail 11241 invoked from network); 4 Apr 2007 10:17:52 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 4 Apr 2007 10:17:52 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 543A924B8C; Wed, 4 Apr 2007 12:17:52 +0200 (CEST) In-Reply-To: <877issii2y.fsf@gmx.at> (Markus Triska's message of "Wed\, 04 Apr 2007 11\:50\:45 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:69041 Archived-At: Markus Triska writes: > David Kastrup writes: > >> I reported this warning without being able to figure out where it >> came from, remember? > > Yes, I remember. I also remember that at least 3 other people figured > it out. So I am not anyone, after all. > One of them submitted a patch. Another one couldn't see the problem > despite having pinpointed the exact location of the call (as you > suggest that the optimiser report), believing in a "bug in the byte > compiler". Probably not anyone, either. > While the error text can be improved, I find it unjustified to call > the current behaviour "nonsensical", "plain useless" or "a compiler > bug". It's a reasonable choice to point to the enclosing defun, Not regarding the line number. I disagree strongly. The name of the enclosing function is useful. The line number isn't, except for verifying that one is not looking at the wrong file. But not even for that the reported number is really helpful since it does not return the line number of the start or end of the defun (which would give the user the clue that the line number is not related to the point of error, but rather the function definition), but rather a line in the function body that is somewhat close to the actual beginning of the defun. And that is worse than useless since it suggests that the line number tries pinpointing some location inside of the function. Which it doesn't. > and if your function has dozens of calls to char-before, there are > probably graver problems to worry about. So you are of the opinion that a function that calls any other function from more than one place is a grave problem, and the byte compiler is not supposed to be helpful with grave problems? Sorry, but I can't see how one could consider your points and conclusions here even remotely tenable. -- David Kastrup