atoi vs strtol in rtl.c:read_rtx()

DJ Delorie dj@redhat.com
Thu May 24 15:55:00 GMT 2001


> > Is there any reason not to use strtol() here?
> 
> Nope.

Would we have to create one that handled HOST_WIDE_INTS bigger than
long?  Say, a strtoll, or strtoull?

Something like:

	if (*tmp_char == '0'
	    && (tmp_char[1] == 'x' || tmp_char[1] == 'X'))
	{
	  tmp_wide = string_to_hex (tmp_char+2);
	  break;
	}
	... original code ...

Or perhaps we could expand the existing atoll function and just always
use it?



More information about the Gcc mailing list