Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/warn/mvp2.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
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 } |