diff mbox

Fix PR c++/61537

Message ID 6e7aaced1d26c1cb5d72967ffd7dae39@imap.force9.net
State New
Headers show

Commit Message

Adam Butcher June 24, 2014, 11:04 p.m. UTC
On 2014-06-24 23:22, Paolo Carlini wrote:
> On 06/24/2014 01:40 AM, Adam Butcher wrote:
>> +// { dg-do compile { target c++1y } }
> I don't think this is a C++1y specific issue...

You're right.  I'm so used to creating pr testcases in that 
g++.dg/cpp1y dir, I automatically added the test there without engaging 
my brain!

>> +// { dg-options "" }
> Also, likely minor detail, could you please explain why you need 
> this?
>

Don't think I do; it was a copy from the most recent test in the cpp1y 
dir (another bad habit).  Same issue as before; need to engage brain. :)

I've fixed these issues up in my tree and moved the test to g++.dg.

Cheers,
Adam

Comments

Jason Merrill June 25, 2014, 12:46 p.m. UTC | #1
On 06/24/2014 07:04 PM, Adam Butcher wrote:
> I've fixed these issues up in my tree and moved the test to g++.dg.

Please put it in g++.dg/template; I'd prefer not to clutter the top 
directory.

> +      bool template_parm_lists_apply
> +	  = parser->num_template_parameter_lists;
> +      for (cp_binding_level *s = current_binding_level; s; s = s->level_chain)
> +	if (s->kind == sk_function_parms)
> +	  template_parm_lists_apply = false;

Let's only start walking if there are template parameters, and stop 
walking when we reach them.

Jason
diff mbox

Patch

diff --git a/gcc/testsuite/g++.dg/cpp1y/pr61537.C 
b/gcc/testsuite/g++.dg/pr61537.C
similarity index 79%
rename from gcc/testsuite/g++.dg/cpp1y/pr61537.C
rename to gcc/testsuite/g++.dg/pr61537.C
index 55761cd..12aaf58 100644
--- a/gcc/testsuite/g++.dg/cpp1y/pr61537.C
+++ b/gcc/testsuite/g++.dg/pr61537.C
@@ -1,6 +1,5 @@ 
  // PR c++/61537
-// { dg-do compile { target c++1y } }
-// { dg-options "" }
+// { dg-do compile }

  struct A {};