Re: proposed ARITH_COMPARE macro

2011-05-15 Thread Paul Eggert
On 05/15/11 17:32, Bruno Haible wrote: > Can you do this purely with macros? I think we should start from a > function, or a set of functions (depending on the input types). I was hoping that we could do it with macros, just as the integer overflow tests are done with macros. The advantage of mac

Re: proposed ARITH_COMPARE macro

2011-05-15 Thread Bruno Haible
Hi Paul, > While we're on the topic of C's arithmetic deficiencies, how about if > we also add a macro for safe and portable comparison? Yes, absolutely! It's a deficiency in the C standard libraries that there are no library functions for doing that. > Something like "ARITH_COMPARE (A, OP, B)"

Re: [PATCH] getopt: for ambiguous options, enumerate the possibilities.

2011-05-15 Thread Bruno Haible
Hi James, > * lib/getopt.c (_getopt_internal_r): Merge glibc change printing > the ambiguous options when an ambiguous prefix is given. This was > glibc Buganizer wishlist bug 7101. What is the "glibc Buganizer wishlist"? The issue is also in glibc's bugzilla

[PATCH] getopt: for ambiguous options, enumerate the possibilities.

2011-05-15 Thread James Youngman
* lib/getopt.c (_getopt_internal_r): Merge glibc change printing the ambiguous options when an ambiguous prefix is given. This was glibc Buganizer wishlist bug 7101. --- ChangeLog|7 +++ lib/getopt.c | 55 ++- 2 files changed, 37 in

proposed ARITH_COMPARE macro

2011-05-15 Thread Paul Eggert
While we're on the topic of C's arithmetic deficiencies, how about if we also add a macro for safe and portable comparison? Something like "ARITH_COMPARE (A, OP, B)" to compare A and B numerically rather than using C's rules. So, for example, ARITH_COMPARE (-1, <, sizeof "x") would return true ev

Re: proposed new module intoverflow

2011-05-15 Thread Paul Eggert
On 05/10/11 09:54, Paul Eggert wrote: > This proposal also uses "SUM" > instead of "ADD", "DIFFERENCE" rather than "SUBTRACT", etc., for > reasons that escape me: I can easily change the names back if that's > what people prefer. Nobody expressed a preference, but I liked the old names so I change