This is the mail archive of the gcc@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: Ada, treelang needs to be converted to --enable-mapped-location


    So?  gcc/ada is part of the GCC tree.  How is line-map.[ch] different?

The point is that when you aren't using GCC as a backend all you need is
that single directory and you don't have to go into outside of that
directory.  Adding the complexity of that reference to share a few
hundred lines of code does not seem worthwhile, especially since ...

    *Just* the implementation of the Source_Ptr type.

The point is that sinfo.ads and sinfo.adb is a huge and complex piece of
code, far larger than linemap.c.  It's going to be a tremendous amout
of work to do the type of surgery you suggest and I don't see *any*
gain in doing do.

In another thread I proposed a very simple solution.  Can you please
comment on whether it's workable or not?

    > The best way of handling such consistency is defining a specification for
    > the error messages and having each language be consistent with that
    > specification.

    Even better is for each language to use the same library.

Not at all.  The terminology and style issues are totally different
between languages.  Giving high-quality diagnostic error messages is a
very difficult task.  Sometimes you want to reference a language
standard, for example.  The way you refer to language items (such as
the case you use to mention keywords) can depend on subtle things in
the program in some languages.  Creating one common routine for
diagnostics will mean teaching that routine the details of *all*
languages and unnecessarily complicates that routine.


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