OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [defarg6.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Copyright (C) 2005 Free Software Foundation, Inc.
2
// Contributed by Nathan Sidwell 14 Oct 2005 
3
 
4
// PR 21353 missing error.
5
// Origin:Andrew Pinski 
6
 
7
enum X{ a, b, c };
8
 
9
struct C
10
{
11
  static void func (X &ref = a); // { dg-error "default argument" "" }
12
};
13
 
14
template 
15
struct D
16
{
17
  static void func (X &ref = a); // not an error at this point
18
};
19
 
20
void Foo (X & obj)
21
{
22
  D::func (obj);
23
 
24
  D::func (); // { dg-error "default argument" "" }
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.