It will return (int) -1. You truncated the result by assigning it to a char variable before the comparison, which is always the bug.I hit this recently with getopt_long(). When running on ARM it will return 255 and a test for (ret < 0) won't work.
Statistics: Posted by jojopi — Thu Apr 24, 2025 11:05 pm