From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#31688: 26.1.50; Byte compiler confuses two string variables Date: Sat, 2 Jun 2018 17:40:47 -0700 (PDT) Message-ID: <197f6fee-36ae-4c55-bf9d-229146343937@default> References: <87a7sdkrft.fsf@runbox.com> <87po199id0.fsf@gmail.com> <87o9gsztqg.fsf@runbox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527986410 15746 195.159.176.226 (3 Jun 2018 00:40:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Jun 2018 00:40:10 +0000 (UTC) Cc: 31688@debbugs.gnu.org To: Gemini Lasswell , Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 03 02:40:05 2018 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 1fPH41-0003zK-8S for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jun 2018 02:40:05 +0200 Original-Received: from localhost ([::1]:33208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPH66-0005ao-Nt for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Jun 2018 20:42:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPH5x-0005aX-P7 for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 20:42:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPH5u-0004PM-LN for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 20:42:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51793) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPH5u-0004PB-HY for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 20:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fPH5u-0004iu-3f for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 20:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jun 2018 00:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31688 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31688-submit@debbugs.gnu.org id=B31688.152798646218073 (code B ref 31688); Sun, 03 Jun 2018 00:42:02 +0000 Original-Received: (at 31688) by debbugs.gnu.org; 3 Jun 2018 00:41:02 +0000 Original-Received: from localhost ([127.0.0.1]:59690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPH4w-0004hR-Ie for submit@debbugs.gnu.org; Sat, 02 Jun 2018 20:41:02 -0400 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:50036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPH4u-0004go-MP for 31688@debbugs.gnu.org; Sat, 02 Jun 2018 20:41:01 -0400 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w530esTH130616; Sun, 3 Jun 2018 00:40:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=Y4jDTlM4+1W5jBg1U4VX7Hk5BjbM8dijWN5ocp9kQ+U=; b=d1LoPRlUCFtPXD+eTuXVdPMn5N23YwN3gtIt1Beaw3nj3NNqi7bTH5E6xA1AMysRIwlJ EOR1Z5a65N00ZAHV4+N4OPr1AjIiXjQoMLlzMOm0wTDhBpFb/uqpGVa3I+hTjukT9mTJ AVAlqPqn1e0LOOAm5LKDtIDD53qbSN6VxZwG2oKCouF0hDIYyBy2Nw3etKs0HsU2KE7n eCYSs5NMPqt8TQUYY0au/dObJxD1P1FB9KFpkE86ERkWd7T3aaBwzZNT9+Z0Gm977LBy 1rE6p8KIqGzdMvQiJ8ZeP3nn+BwuyNAAIQpph3lAAFYii67aL8xZ2YcWe26ui4N3WSj7 BQ== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2jbvynrdk3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 03 Jun 2018 00:40:54 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w530epjL029749 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 3 Jun 2018 00:40:51 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w530enwZ018147; Sun, 3 Jun 2018 00:40:49 GMT In-Reply-To: <87o9gsztqg.fsf@runbox.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8912 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806030004 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:146888 Archived-At: > just searched the Elisp reference > looking for any any warnings not to use destructive functions on > literals, and didn't find anything.=20 It's not really about destructive functions. It's about the fact that you might not have two different strings, and you should not assume that you do. It's about `eq'. For the Emacs byte-compiler, apparently, multiple occurrences of a string literal in the code are compiled to the same string object. Thinking you have two separate strings is the problem. Anything you might want to think or say about the use of "destructive" functions follows from the fact that you have a single string.