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 represent column numbers using source_location


Eric Botcazou wrote:

I would personally lean towards the third class of solutions.
> [I.e. Don't include line-map.h in gengtype.c] Is

typedef unsigned int source_location;


the only reason to include line-map.h everywhere? If so, I think moving it to coretypes.h would indeed be a sensible solution.

The file already contains these bits:

/* Provide forward struct declaration so that we don't have to include
   all of cpplib.h whenever a random prototype includes a pointer.
   Note that the cpp_reader typedef remains part of cpplib.h.  */

struct cpp_reader;

Yes, but it's easy to define struct types in multiple location. That doesn't work for a typedef, and we don't want to have cpplib or line-map.[hc] depend on coretypes.h. -- --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]