Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/warn/register-var-2.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* PR/18160 */ |
2 | |
3 /* { dg-do compile } */ | |
4 | |
5 /* This should yield an error even without -pedantic. */ | |
6 /* { dg-options "-Wall -W" } */ | |
7 | |
8 void g(int *); | |
9 | |
10 void f(void) | |
11 { | |
12 register int x; /* { dg-warning "ISO C\\+\\+17 does not allow 'register' storage class specifier" "" { target c++17 } } */ | |
13 g(&x); /* { dg-warning "address requested for 'x', which is declared 'register'" } */ | |
14 } |