summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wunreachable-code-2.C
blob: d50f7fe57d7f06557db3922c6d90c0005cfdc83a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR c++/21228
/* { dg-options "-Wunreachable-code" } */

class testStringBase
{
public:
  char *stringPtr;
};

class testString : public testStringBase
{
public:
  testString();
};

testString::testString()
{
  stringPtr = (char *) 9;
}
 
int main(int argc, char **argv) {
  testString s;
}