This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: adjust column counter for tabs
Zack Weinberg wrote:-
> You should check that arg is not the empty string before calling
> strtol (unless this is guaranteed by the option parser - I forget),
> and you should check that endptr points to the end of string
> afterward.
arg != 0 is guaranteed. It could be a zero-length string though -
strtol has no problem with that though, does it? Yes, I forgot
the *endptr == '\0' check.
Neil.