This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR c++/26291: Diagnose invalid ellipsis in operator declaration
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 19 Feb 2006 11:41:39 -0800
- Subject: Re: [patch] Fix PR c++/26291: Diagnose invalid ellipsis in operator declaration
- References: <tkrat.189ca6accfbca852@igpm.rwth-aachen.de>
Volker Reichelt wrote:
> PR c++/26291
> * decl.c (grok_op_properties): Check for ellipsis in arguments of
> operators.
> @@ -9022,6 +9024,9 @@ grok_op_properties (tree decl, bool comp
> }
> else if (ambi_op_p (operator_code))
> {
> + if (ellipsis_p)
> + error ("arguments of %qD must not contain ellipsis", decl);
Rather that duplicating this code, let's pull it out into a (new) block
containing the various ambi_op_p/unary_op_p/binary_op_p tests. Also, I
think it would be better not to issue both the ellipsis error and
additional arity errors, although that's a very minor point.
With that change, the patch is pre-approved for mainline and 4.0 branch,
and for 4.1 after the final 4.1 release.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713