OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2012-12-15 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
auto10.C
1
// Positive test for auto
2
// { dg-do run }
3
// { dg-options "-std=c++0x" }
4
5
#include <typeinfo>
6
extern "C" void abort();
7
8
int main()
9
{
10
if (auto i = 42L)
11
{
12
if (typeid (i) != typeid (long int))
13
abort ();
14
}
15
16
while (auto i = 1)
17
{
18
if (typeid (i) != typeid (int))
19
abort ();
20
break;
21
}
22
}