Re: c++ headers w/ -pedantic, overflow in implicit constant conversion

2012-05-10 Thread Otto Moerbeek
On Thu, May 10, 2012 at 05:00:19PM +, Miod Vallat wrote: > > Look, landry just reminded me that I forgot to commit this. It was mostly > > awaiting test results, and we've been running with this for almost two > > months. > > > > If you think something else is better, take it upstream, since

Re: c++ headers w/ -pedantic, overflow in implicit constant conversion

2012-05-10 Thread Miod Vallat
> Look, landry just reminded me that I forgot to commit this. It was mostly > awaiting test results, and we've been running with this for almost two > months. > > If you think something else is better, take it upstream, since I actually > took the fix from recent gcc, and I'd prefer to avoid diver

Re: c++ headers w/ -pedantic, overflow in implicit constant conversion

2012-05-10 Thread Marc Espie
On Thu, May 10, 2012 at 08:46:26AM -0700, Matthew Dempsky wrote: > On Thu, Mar 15, 2012 at 3:19 AM, Marc Espie wrote: > > #define __glibcxx_max(T) \ > > - (__glibcxx_signed (T) ? ((T)1 << __glibcxx_digits (T)) - 1 : ~(T)0) > > + (__glibcxx_signed (T) ? \ > > + (T)1 << (__glibcxx_digits

Re: c++ headers w/ -pedantic, overflow in implicit constant conversion

2012-05-10 Thread Matthew Dempsky
Oh even if it's not signed that ternary branch will still be in code. I see. Hm. On May 10, 2012 9:23 AM, "Matthew Dempsky" wrote:

Re: c++ headers w/ -pedantic, overflow in implicit constant conversion

2012-05-10 Thread Matthew Dempsky
I'm pretty sure unsigned int is never a signed type.

Re: c++ headers w/ -pedantic, overflow in implicit constant conversion

2012-05-10 Thread Otto Moerbeek
On Thu, May 10, 2012 at 08:46:26AM -0700, Matthew Dempsky wrote: > On Thu, Mar 15, 2012 at 3:19 AM, Marc Espie wrote: > > #define __glibcxx_max(T) \ > > - (__glibcxx_signed (T) ? ((T)1 << __glibcxx_digits (T)) - 1 : ~(T)0) > > + (__glibcxx_signed (T) ? \ > > + (T)1 << (__glibcxx_digit

Re: c++ headers w/ -pedantic, overflow in implicit constant conversion

2012-05-10 Thread Matthew Dempsky
On Thu, Mar 15, 2012 at 3:19 AM, Marc Espie wrote: > #define __glibcxx_max(T) \ > - (__glibcxx_signed (T) ? ((T)1 << __glibcxx_digits (T)) - 1 : ~(T)0) > + (__glibcxx_signed (T) ? \ > + (T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0) > + How about (T)(((unsigned T)1 << __

Re: c++ headers w/ -pedantic, overflow in implicit constant conversion

2012-05-10 Thread Landry Breuil
On Thu, Mar 15, 2012 at 11:19:43AM +0100, Marc Espie wrote: > On Thu, Mar 15, 2012 at 01:39:18AM +, Stuart Henderson wrote: > > $ c++ -pedantic -c a.c > > In file included from /usr/include/g++/memory:60, > > from /usr/include/g++/string:48, > > from a.c:1: > >

Re: c++ headers w/ -pedantic, overflow in implicit constant conversion

2012-03-15 Thread Marc Espie
On Thu, Mar 15, 2012 at 01:39:18AM +, Stuart Henderson wrote: > $ c++ -pedantic -c a.c > In file included from /usr/include/g++/memory:60, > from /usr/include/g++/string:48, > from a.c:1: > /usr/include/g++/limits: In static member function 'static char > std: