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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [auto3.C] - Blame information for rev 709

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

Line No. Rev Author Line
1 693 jeremybenn
// Negative test for auto
2
// { dg-options "-std=c++0x" }
3
 
4
#include 
5
 
6
auto x;                         // { dg-error "auto" }
7
 
8
// If the type deduced for the template parameter U is not the same in each
9
// deduction, the program is ill-formed.
10
auto i = 42, j = 42.0;          // { dg-error "auto" }
11
 
12
// New CWG issue
13
auto a[2] = { 1, 2 };           // { dg-error "initializer_list" }
14
 
15
template
16
struct A { };
17
 
18
A A1;
19
// CWG issue 625
20
A A2 = A1;              // { dg-error "" }
21
 
22
auto foo() { }                  // { dg-error "auto" }
23
 
24
void bar(auto i)                // { dg-error "incomplete|auto" }
25
{
26
  (void)i;
27
}

powered by: WebSVN 2.1.0

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