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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr49.C] - Blame information for rev 821

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// Contributed by: Giovanni Bajo 
3
// DR 49: Non-constant pointers are invalid template arguments.
4
 
5
template struct R { /* ... */ };
6
template struct S { /* ... */ };
7
 
8
int p;
9
template struct R<&p>; // OK
10
template struct S<&p>; // OK due to parameter adjustment
11
 
12
int *ptr;
13
template struct R; // { dg-error "argument" }
14
template struct S; // { dg-error "argument" }
15
 
16
int v[5];
17
template struct R; // OK due to implicit argument conversion
18
template struct S; // OK due to both adjustment and conversion
19
 

powered by: WebSVN 2.1.0

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