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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr49.C] - Diff between revs 154 and 816

Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
// { dg-do compile }
// { dg-do compile }
// Contributed by: Giovanni Bajo 
// Contributed by: Giovanni Bajo 
// DR 49: Non-constant pointers are invalid template arguments.
// DR 49: Non-constant pointers are invalid template arguments.
template struct R { /* ... */ };
template struct R { /* ... */ };
template struct S { /* ... */ };
template struct S { /* ... */ };
int p;
int p;
template struct R<&p>; // OK
template struct R<&p>; // OK
template struct S<&p>; // OK due to parameter adjustment
template struct S<&p>; // OK due to parameter adjustment
int *ptr;
int *ptr;
template struct R; // { dg-error "argument" }
template struct R; // { dg-error "argument" }
template struct S; // { dg-error "argument" }
template struct S; // { dg-error "argument" }
int v[5];
int v[5];
template struct R; // OK due to implicit argument conversion
template struct R; // OK due to implicit argument conversion
template struct S; // OK due to both adjustment and conversion
template struct S; // OK due to both adjustment and conversion
 
 

powered by: WebSVN 2.1.0

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