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: [4.5] [RFC] Move line-map.* to its own library (libloc)


>>>>> "Manuel" == Manuel LÃpez-IbÃÃez <lopezibanez@gmail.com> writes:

Manuel> The following patch moves line-map.* and other stuff related to
Manuel> locations to a library called libloc. Anything that only needs
Manuel> location info does not need to link against libcpp or include libcpp.h
Manuel> anymore.

Is the rationale for this just to avoid pulling in the rest of libcpp?
That doesn't seem like a big enough benefit to justify making a new
library.

I can't approve or reject this part, though.  Some global reviewer
would have to.

Manuel>        * tree.c (expand_location): Move to line-map.c.
Manuel>        * input.h (UNKNOWN_LOCATION): Move to line-map.h.
Manuel>        (BUILTINS_LOCATION): Likewise.

I like most of these changes.

One oddity here is that BUILTINS_LOCATION is not actually enforced, or
even known about, by line-map.  It is only "correct" because gcc is
careful to arrange things that way.  So, it isn't clear that moving
this to line-map is enough -- in the sense that, there is still an
un-obvious dependency between how gcc is coded and what the #define
claims.  So, I don't think moving this makes sense unless it is
accompanied by some other changes to line-map -- BUILTINS_LOCATION is
really an implementation detail of gcc, not part of the interface.

Why is expand_location a #define now?

Tom


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