Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/torture/pr55740.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 // { dg-do compile } |
2 | |
3 static bool st_IsPathDelimiter( char c ) { return c == '/'; } | |
4 bool IsValidPath( char const * filename ) | |
5 { | |
6 if ( !filename || filename[0] == 0 ) | |
7 return false; | |
8 char const * run = filename; | |
9 while ( run && *run ) | |
10 { | |
11 if ( run[0] == '.' ) | |
12 if ( run[1] != '.' || ( !st_IsPathDelimiter( run[2] ) && run[2] != 0 ) ) | |
13 return false; | |
14 while ( *run && !st_IsPathDelimiter( *run ) ) | |
15 ++run; | |
16 if ( *run ) | |
17 ++run; | |
18 } | |
131 | 19 } // { dg-warning "control reaches end of non-void function" } |