Re: [Bug-gnulib] addition: size_max.m4, ptrdiff_max.m4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Eggert wrote:
> #define SIZE_MAX (2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(2*(1ul)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)
>
> and expressions like these can be computed easily using binary search.

Reprensenting one bit through 6 characters? I think many developers who
look at the "gcc -E" output will hate us for this. But maybe it this issue
can be solved through some postprocessing that converts the binary number
to hexadecimal. For example, you repeat the following sed on it until it
doesn't change any more:

sed -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+0)+0)+0)+0),(\10\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+0)+0)+0)+1),(\11\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+0)+0)+1)+0),(\12\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+0)+0)+1)+1),(\13\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+0)+1)+0)+0),(\14\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+0)+1)+0)+1),(\15\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+0)+1)+1)+0),(\16\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+0)+1)+1)+1),(\17\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+1)+0)+0)+0),(\18\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+1)+0)+0)+1),(\19\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+1)+0)+1)+0),(\1a\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+1)+0)+1)+1),(\1b\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+1)+1)+0)+0),(\1c\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+1)+1)+0)+1),(\1d\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+1)+1)+1)+0),(\1e\2),' \
    -e 's,(2\*(2\*(2\*(2\*(\([0-9A-Fa-f]*\)\([ULul]*\))+1)+1)+1)+1),(\1f\2),'

Bruno




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux