https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809

--- Comment #39 from Qing Zhao <qing.zhao at oracle dot com> ---
> --- Comment #38 from Wilco <wilco at gcc dot gnu.org> ---
> This uses signed char while the C standard says the comparison is done on
> unsigned chars.
> 

during my implementation, I did some research on whether I should use “unsigned
char” or “signed char”
for the comparison.  what I checked was man page of strcmp, memcmp, (I don’t
have C standard in hand).
in the manpage of memcmp, it clearly and explicitly mentioned that the chars
are interpreted as unsigned char;
however, in the manpage of strcmp/strncmp, it’s not mentioned at all.  So, I
thought that for strcmp/strncmp,
I should use signed char.  but for memcmp, I used unsigned char.

since I don’t have a C standard, could you please point me the corresponding
section for this?
thanks.

Reply via email to