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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [bad-error6.C] - Blame information for rev 305

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// GROUPS passed bad-errors
3
typedef __SIZE_TYPE__ size_t;
4
 
5
class tt {
6
    public:
7
    tt(int);
8
 
9
    private:
10
    void *operator new(size_t a); // Forbid object creation in heap memory.
11
};
12
 
13
void st(const tt&, int);
14
 
15
void ff(int i, int j)
16
{
17
    if( i > 0 ) {
18
        // This work ok.
19
        tt a_tt(i);
20
        st(a_tt, j);
21
    }
22
    else {
23
        // This triggers an error because of private operator new ????.
24
        st(tt(-i), j);
25
    }
26
}

powered by: WebSVN 2.1.0

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