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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900208_03.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// g++ 1.36.1 bug 900208_03
3
 
4
// The Cfront 2.0 reference manual (5.3.3) says "This type must be an
5
// object type; functions cannot be allocated this way...".
6
 
7
// g++ fails to detect (at compile time) cases where an attempt is made to
8
// allocate a function using new.
9
 
10
// keywords: operator new, function types
11
 
12
typedef void (func_type) ();
13
 
14
void global_function_0 ()
15
{
16
  new func_type;        // { dg-error "" } missed by both cfront 2.0 and g++ 1.36.1
17
}
18
 
19
int main () { return 0; }

powered by: WebSVN 2.1.0

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