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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wreturn-type-4.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
/* PR c++/18313 */
2
/* { dg-do compile } */
3
/* { dg-options "-Wignored-qualifiers" } */
4
 
5
volatile void bar(); /* { dg-warning "type qualifiers ignored" } */
6
 
7
struct A
8
{
9
    const int bla(); /* { dg-warning "type qualifiers ignored" } */
10
    static const A getA(); /* { dg-bogus "type qualifiers" } */
11
};
12
 
13
template const T getfoo(const T def) /* { dg-bogus "type qualifiers ignored" } */
14
{ return def; }
15
 
16
template class Pair
17
{
18
    public:
19
        T getLeft() const { return T(); }   /* { dg-bogus "type qualifiers ignored" } */
20
        const T getRight() const { return T(); } /* { dg-bogus "type qualifiers ignored" } */
21
};
22
 
23
template  struct S {
24
    const int f();                     /* { dg-warning "type qualifiers ignored" } */
25
    const T g();                       /* { dg-bogus "type qualifiers ignored" } */
26
    T h();
27
};
28
 
29
int* testtemplate()
30
{
31
    int i;
32
 
33
    Pair a;
34
 
35
    a.getLeft();
36
    a.getRight();
37
 
38
    S b;
39
    b.h();              /* { dg-bogus "type qualifiers ignored" } */
40
    b.g();              /* { dg-bogus "type qualifiers ignored" } */
41
 
42
    return getfoo(&i);
43
}

powered by: WebSVN 2.1.0

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