Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-14.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
15 # define LINE 0 | 15 # define LINE 0 |
16 #endif | 16 #endif |
17 | 17 |
18 extern int int_value (void); | 18 extern int int_value (void); |
19 | 19 |
20 int int_range (int min, int max) | 20 static int int_range (int min, int max) |
21 { | 21 { |
22 int n = int_value (); | 22 int n = int_value (); |
23 return n < min || max < n ? min : n; | 23 return n < min || max < n ? min : n; |
24 } | 24 } |
25 | 25 |
26 const char* | 26 static const char* |
27 choose_string (const char *s1, const char *s2, const char *s3) | 27 choose_string (const char *s1, const char *s2, const char *s3) |
28 { | 28 { |
29 int i = int_value (); | 29 int i = int_value (); |
30 return i < 0 ? s1 : 0 < i ? s3 : s2; | 30 return i < 0 ? s1 : 0 < i ? s3 : s2; |
31 } | 31 } |