From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15266 invoked by alias); 21 Mar 2006 19:55:51 -0000 Received: (qmail 15258 invoked by uid 22791); 21 Mar 2006 19:55:51 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 21 Mar 2006 19:55:50 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-66-146.inter.net.il [80.230.66.146]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DUN95194 (AUTH halo1); Tue, 21 Mar 2006 21:55:45 +0200 (IST) Date: Thu, 23 Mar 2006 04:55:00 -0000 Message-Id: From: Eli Zaretskii To: Andreas Schwab , Denis PILAT CC: Chet Ramey , gdb-patches@sources.redhat.com, bash-maintainers@gnu.org In-reply-to: <20060321153308.GC27369@brasko.net> (message from Bob Rossi on Tue, 21 Mar 2006 10:33:08 -0500) Subject: Re: [patch-readline] history file reading Reply-to: Eli Zaretskii References: <44196BC6.4050503@st.com> <441FD3C7.1090504@st.com> <44201202.3010001@case.edu> <44196BC6.4050503@st.com> <441FD3C7.1090504@st.com> <20060321145842.GA25689@nevyn.them.org> <20060321153308.GC27369@brasko.net> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00250.txt.bz2 > Date: Tue, 21 Mar 2006 10:33:08 -0500 > From: Bob Rossi > Cc: Denis PILAT , Chet Ramey , > Eli Zaretskii , gdb-patches@sources.redhat.com, > bash-maintainers@gnu.org > > > line_end[-1] whould be much better readable, IMHO. > > Can you even index into an array with a negitive number? Yes, provided that the result is valid, i.e. it doesn't reference an address outside the array. In fact, in C, `*(foo -1)' and `foo[-1]' is literally the same thing by the language rules, and the compiler produces identical code for both expressions.