[patch-readline] history file reading

Eli Zaretskii eliz@gnu.org
Thu Mar 23 04:55:00 GMT 2006


> Date: Tue, 21 Mar 2006 10:33:08 -0500
> From: Bob Rossi <bob_rossi@cox.net>
> Cc: Denis PILAT <denis.pilat@st.com>, Chet Ramey <chet.ramey@case.edu>,
> 	Eli Zaretskii <eliz@gnu.org>, 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.



More information about the Gdb-patches mailing list