Limit compiler error

I am using Code :: Blocks 10.05 and mingw. It seems that the compiler did not recognize the classifier of restrictions and did not return "error: expected"; ",", "or") "to" src ". Do I need to pass any compiler parameter to compile it correctly?

int inet_pton4 (const char *restrict src, unsigned char *restrict dst)

p / s: it seems mingw does not support inet_pton4, so I tried to integrate the open source version into my code.

+5
source share
2 answers

If your compiler does not support the keyword restrict, just open that keyword (a) .

, () , , , , , .

, , ( ).

, , ( ), , " ": )


(a) , C99. , gcc, restrict, , C99, , -std=c99 (gcc docs restrict 3.0).

- C99, , gcc , __restrict.

+7

restrict C99, , @paxdiablo, restrict , :

#if __STDC_VERSION__ < 199901L
#define restrict /* nothing */
#endif

, #include d (, , , restrict).

C, , C99 . , __STDC_VERSION__.

, MinGW, gcc, gcc --std=c99 ( @paxdiablo).

. ( #if, , .)

+3

All Articles