URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// Copyright (C) 2005 Free Software Foundation, Inc.
|
// Copyright (C) 2005 Free Software Foundation, Inc.
|
// Contributed by Nathan Sidwell 14 Oct 2005
|
// Contributed by Nathan Sidwell 14 Oct 2005
|
|
|
// PR 21353 missing error.
|
// PR 21353 missing error.
|
// Origin:Andrew Pinski
|
// Origin:Andrew Pinski
|
|
|
enum X{ a, b, c };
|
enum X{ a, b, c };
|
|
|
struct C
|
struct C
|
{
|
{
|
static void func (X &ref = a); // { dg-error "default argument" "" }
|
static void func (X &ref = a); // { dg-error "default argument" "" }
|
};
|
};
|
|
|
template
|
template
|
struct D
|
struct D
|
{
|
{
|
static void func (X &ref = a); // not an error at this point
|
static void func (X &ref = a); // not an error at this point
|
};
|
};
|
|
|
void Foo (X & obj)
|
void Foo (X & obj)
|
{
|
{
|
D::func (obj);
|
D::func (obj);
|
|
|
D::func (); // { dg-error "default argument" "" }
|
D::func (); // { dg-error "default argument" "" }
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.