Patch to fix diagnostic format warnings in cp/ dir

Gabriel Dos Reis gdr@integrable-solutions.net
Thu Jul 3 07:20:00 GMT 2003


"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:

| One more question, I'm not sure where and if I need OVL_FUNCTION.  One
| diagnostic in my previous patch references overloading:
| 
|  > @@ -927,7 +927,7 @@ add_method (tree type, tree method, int
|  >               else
|  >                 {
|  >                   cp_error_at ("`%#D' and `%#D' cannot be overloaded",
|  > -                              method, fn, method);
|  > +                              method, fn);
|  > 
|  >                   /* We don't call duplicate_decls here to merge
|  >                      the declarations because that will confuse
| 
| But in this case, we simply have an extra argument.  The second
| `method' is spurious because it doesn't get used.  AFAICT, those
| trailing extra args are only used when no specifiers appear.  In this
| example, the "here" notion is set from `fn', right?

Yes, you're right.

| So I'm not sure what if anything to do with OVL_FUNCTION.  Can you
| please explain that to me?

The OVERLOAD set used to come with messages having to do with
ambiguity (overload resolution, template arguments deduction, ...).  
But now looking for closely at the codes, I'm under the impression that
OVERLOADs seem to be folded upfront by the front-end, so they might
not be an issue any more.  Please install your patch.

Thanks,

-- Gaby



More information about the Gcc-patches mailing list