My compiler (DSP SHARC) is very picky. When I build with comments, I get this error:
[cc1123] foo.c:1511 {D} remark: comparison of unsigned type
with signed type
while (taille > 0)
Two solutions:
The compiler is right and I have to write
size_t taille;
...
while(taille > (size_t)0)
The compiler is stupid and I have to ignore this remark
Another solution that may include ISO or MISRA standards
What should I do with this remark?
EDIT
In fact, it’s better to write this example, for example
while(taille) {...}
But this is not related to my initial question.
nowox source
share