Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/warn/mvp2.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
rev | line source |
---|---|
131 | 1 // PR c++/83592 |
2 // { dg-do compile } | |
3 // { dg-options "-Wparentheses" } | |
4 | |
5 // Test that -Wparentheses does not give bogus warnings in | |
6 // typename context. | |
7 | |
8 int * | |
9 foo (long &a) | |
10 { | |
11 return reinterpret_cast<int (*)> (&a); | |
12 } | |
13 | |
14 int * | |
15 bar (long &a) | |
16 { | |
17 return (int (*)) &a; | |
18 } | |
19 | |
20 int * | |
21 baz (int &a) | |
22 { | |
23 return static_cast<int (*const)> (&a); | |
24 } |