This is the mail archive of the gcc-patches@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: [lto] Add several C++ testcases.


Kazu Hirata wrote:
> Hi,
> 
> Attached is a patch to add several C++ testcases.

Thanks.

> 2006-06-12  Mark Mitchell  <mark@codesourcery.com>
> 	    Kazu Hirata  <kazu@codesourcery.com>
> 
> 	* g++.dg/parse/ctor6.C, g++.dg/parse/defarg11.C,
> 	g++.dg/template/friend42.C, g++.dg/template/spec30.C: New.

OK for mainline and LTO with minor changes below.

> +  void operator& (int = 1); // { dg-error "error: 'void foo::operator&\\(int\\)' cannot have default arguments" }
> +  void operator++ (int = 2); // { dg-error "error: 'void foo::operator\\+\\+\\(int\\)' cannot have default arguments" }
> +  void operator-- (int = 3); // { dg-error "error: 'void foo::operator--\\(int\\)' cannot have default arguments" }

For these, and all the other error messages in your test cases, please
just say:

  // { dg-error "default argument" }

The long messages are too fragile.  Small changes to the compiler might
change the message, but it should continue to say "default argument"
since that is in fact the key problem.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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