This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch to add typedef for "logical line" [ping]


See http://gcc.gnu.org/ml/gcc-patches/2003-07/msg02667.html

This is a patch to add a typedef for the "logical lines" that are
managed by line-map.c.  I suggest "fileline" as the typedef, but
possible alternatives include logical_line or line_index.  (I don't
much care for the latter.)

The patch also added comments to indicating that long-term we want
to replace struct location_s (in input.h) by the fileline type. This
may be controversial: The big plus is tha fileline cookies are much
more compact, and can store extra state (such as include file
hierarchies and potentially column numbers) in 32 bits. However, the
are currently mainly used by cpplib. Furthermore, decoding a fileline
to a printable filename and linenumber is slower, and less convenient (especially while debugging).
--
--Per Bothner
per@bothner.com http://per.bothner.com/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]