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: Removing unspecified template parameters from error messages


Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> writes:

| gdr@cs.tamu.edu said:
| > Where are you making the changes?  In cp/error.c?
| 
| Yes since as far as I can tell it seems that it is the machinery 
| within cp/error.c that gets called for diagnostics, not the one in
| cp/cxx-pretty-print.c. Am I missing something ?

At the moment, it is a combination of cp/error.c and
cp/cxx-pretty-print.c (as you can see by grepping for "pp_*").

cp/error.c is scheduled to go away.  Currently, cp/error.c is still
used for the type printing part but if you're looking at the default
template arguments issue, you should really consider enabling
cp/cxx-pretty-print.c to print all types -- not just some of them.

| 
| I saw cp/cxx-pretty-print.c but using gdb found that it was not used 
| for emitting diagnostics.
| 
| >  I think cp/cxx-pretty-print.c is a better place, as it allows for more
| > information to flow in properly and naturally. 
| 
| I will look at it during the week-end.... But again, how can I make 
| use of cp/cxx-pretty-print.c for diagnostics. There is clearly 
| something that I did not understood.

The way I was doing this is to gradually replace dump_type() with
pp_cxx_type_id() and such.  If you want to switch completely, you
modify cp_printer() to call pp_cxx_* instead of the dump_*.  Last time
I tried, I got some regressions in the testsuite -- but they were very
serious. 

-- Gaby


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