This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] C++ error for parameter redefinition in function prototypes
Mark Mitchell <mark@codesourcery.com> writes:
| Simon Baldwin wrote:
|
| > I've attached a new version of the patch below. Please take another
| > look when you get the opportunity.
|
| This version looks good to me, with one minor adjustment:
|
| > + if (DECL_NAME (decl))
| > + {
| > + if (pointer_set_contains (unique_decls, DECL_NAME (decl)))
| > + error ("redefinition of parameter %qD", decl);
|
| Here, I think it would be better to say:
|
| error ("multiple parameters named %qD", DECL_NAME (decl));
^
Please use "E" here, as the DECL_NAME is not a declaration, but an
expression (IDENTIFIER_NODE).
-- Gaby