Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.c-torture/compile/pr65803.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-options "-fno-strict-overflow" } */ |
2 typedef unsigned char __uint8_t; | |
3 typedef __uint8_t uint8_t; | |
4 typedef uint8_t u8_t; | |
5 typedef struct ip_addr ip_addr_t; | |
6 char * | |
7 ipaddr_ntoa_r (const ip_addr_t * addr, char *buf, int buflen) | |
8 { | |
9 char inv[3]; | |
10 char *rp; | |
11 u8_t *ap; | |
12 u8_t n; | |
13 u8_t i; | |
14 int len = 0; | |
15 for (n = 0; n < 4; n++) | |
16 { | |
17 while (*ap); | |
18 while (i--) | |
19 { | |
20 if (len++ >= buflen) | |
21 return ((void *) 0); | |
22 *rp++ = inv[i]; | |
23 } ap++; | |
24 } | |
25 } |