[C++ PATCH] Fix PR/11106

Gabriel Dos Reis gdr@integrable-solutions.net
Sat Jun 14 17:41:00 GMT 2003


"Giovanni Bajo" <giovannibajo@libero.it> writes:

| Hello,
| 
| this patch fixes PR/11106, where a partially mangled name was output within
| a diagnostic:
| 
|    error: no members matching `using S<int>::operator PN1SIT_0__E1IE' in
| `struct S<int>'
| 
| The problem is that dump_decl() was printing the DECL_NAME of a USING_DECL
| directly. Instead, dump_decl() already has logic to handle an
| IDENTIFIER_NODE correctly, so my patch simply makes the function call itself
| to print the correct message. After the patch, the error message is:
| 
|    error: no members matching `using S<int>::operator S<T>::I*' in `struct
| S<int>'

Thanks.

| Notice that there is a S<T> instead of S<int>, but I don't know how I could
| fix it, and besides it's still much better than before.

Don't bother with that.  Most of the logic of the spaghetti code in
cp/error.c has been broken for a long time.  I think your patch is
fine.   

| Bootstrapped on i686-pc-cygwin (all languages), and tested with a toplevel
| "make -k check" with no new regressions. Notice that my environment
| currently cannot run the libstdc++ testsuite so I could not test it.
| 
| OK for mainline?

Yes.

Mark, I'm recommanding this patch for branch. 

-- Gaby



More information about the Gcc-patches mailing list