decimal floating point

2012-06-18 Thread Franz Fehringer
Hi, I am investigating the possibilities of using decimal floating point arithmetic with gcc (on Linux / x86_64 to be explicit). Are _Decimal32/_Decimal64/_Decimal128 available as builtin types without further action or do i as a DFP consumer have to issue the correspondent typedef/float/attribute

building libstdc++ standalone

2012-06-18 Thread Mailaripillai, Kannan Jeganathan
Hi, Posted this query (attached below) to gcc-help. Did not get response yet so posting it here. Appreciate your help. http://gcc.gnu.org/ml/gcc-help/2012-06/msg00156.html (Copy attached below). Thanks, Kannan -Original Message- From: Mailaripillai, Kannan Jeganathan Sent: Tuesday, J

C Metaprogramming

2012-06-18 Thread Daniel Santos
Yes, my topic sounds crazy huh? But you guys made it possible when you started optimizing out constant function pointers. (Thank you!!) This didn't mature to "full power" until 4.6.? (works in 4.6.2, not sure about earlier 4.6). Now that you can populate a struct with const pointers to inline fun

Re: Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-18 Thread 3dw4rd
On 06/18/12, Paolo Carlini wrote: > > ... I suppose that for 4.8.0 we really want to bump the ABI, for many other > reasons too, and be done with it. > > Paolo. Would this bump include everything? Such as rebasing std::ios_base::failure from std::exception to std::system_error and everything

Re: [patch][rfc] How to handle static constructors on linux

2012-06-18 Thread Cary Coutant
> But I am still missing something, why is the performance so different? > Code layout putting the constructors' body in the reverse order they > are called? Yes, as I understand it. Cache and TLB prefetching works better when code executes from lower to higher addresses than when executing from h

Re: [patch][rfc] How to handle static constructors on linux

2012-06-18 Thread Rafael Espíndola
> This has a long and complicated history. I tried to explain some of that here: > >   http://gcc.gnu.org/ml/gcc-bugs/2010-12/msg01493.html > > I wasn't part of the GCC community at the time, but I think that > .ctors was originally used instead of .init or .init_array precisely > because the order

Re: [patch][rfc] How to handle static constructors on linux

2012-06-18 Thread Cary Coutant
>> Furthermore, if you're working in chromium, you should be aware that >> the new behavior is exactly what the Chrome developers are arguing >> for, as it makes the startup faster. It sounds to me like you're >> working at cross purposes with the other developers on that project. > > Ah, perhaps t

Re: [patch][rfc] How to handle static constructors on linux

2012-06-18 Thread Chandler Carruth
On Mon, Jun 18, 2012 at 11:08 AM, Cary Coutant wrote: >> So this is not as bad as I was expecting (old programs still work), >> but it is still a somewhat annoying ABI change to handle. I think we >> can add support for this in clang in 3 ways: >> >> 1) Require new linkers when using gcc 4.7 libra

Re: [patch][rfc] How to handle static constructors on linux

2012-06-18 Thread Chandler Carruth
[Re-sending this to try to got through to the GCC mailing list... Sorry for the duplication to others... My reply is at the bottom] On Mon, Jun 18, 2012 at 11:08 AM, Chandler Carruth wrote: > On Mon, Jun 18, 2012 at 10:49 AM, Rafael Espíndola > wrote: >> >> > The GNU linker has support to merge

Re: [patch][rfc] How to handle static constructors on linux

2012-06-18 Thread Cary Coutant
> So this is not as bad as I was expecting (old programs still work), > but it is still a somewhat annoying ABI change to handle. I think we > can add support for this in clang in 3 ways: > > 1) Require new linkers when using gcc 4.7 libraries. > 2) Ship our own versions of crtbeginS.o (and similar

Re: [patch][rfc] How to handle static constructors on linux

2012-06-18 Thread Rafael Espíndola
> The GNU linker has support to merge .ctor's into init_array.  Does the > gold linker have the same feature?  This seems more like the real fix > rather than just hacking around the issue. Recent version have it. I found the bug when using gold 2.21 which doesn't. What seems to happen is: * In a

Re: [patch][rfc] How to handle static constructors on linux

2012-06-18 Thread Andrew Pinski
On Mon, Jun 18, 2012 at 7:20 AM, Rafael Espíndola wrote: > ccing the gcc list and Cary Coutant. > > The issue comes from gcc pr46770. Cary, have you tried implementing > the --reverse-init-array option? Does it solve the problems you were > seeing? > > Can libstdc++ be fixed to work with the iostr

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-18 Thread Paolo Carlini
Hi, On 06/18/2012 06:01 PM, Michael Matz wrote: Hi, On Mon, 18 Jun 2012, Gabriel Dos Reis wrote: Jeff, please note that the path that Michael took from what was said ealier (in particular the quote he provided in his message) and the conclusion of "enthusiasm for soname bump" is still a myste

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-18 Thread Michael Matz
Hi, On Mon, 18 Jun 2012, Gabriel Dos Reis wrote: > Jeff, please note that the path that Michael took from what was said > ealier (in particular the quote he provided in his message) and the > conclusion of "enthusiasm for soname bump" is still a mystery. The quoted part suggested switching std

Re: [patch][rfc] How to handle static constructors on linux

2012-06-18 Thread Rafael Espíndola
ccing the gcc list and Cary Coutant. The issue comes from gcc pr46770. Cary, have you tried implementing the --reverse-init-array option? Does it solve the problems you were seeing? Can libstdc++ be fixed to work with the iostream static constructors being in .ctor or .init_array? Would you be in

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-18 Thread Jeff Law
On 06/18/2012 07:16 AM, Gabriel Dos Reis wrote: On Mon, Jun 18, 2012 at 7:55 AM, Jeff Law wrote: On 06/16/2012 12:46 PM, Michael Matz wrote: A soname change for a basic system library is a _major_ PITA and should be avoided even at large costs. In that light: do you have a plan of action o

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-18 Thread Gabriel Dos Reis
On Mon, Jun 18, 2012 at 7:55 AM, Jeff Law wrote: > On 06/16/2012 12:46 PM, Michael Matz wrote: >>> >>> >> A soname change for a basic system library is a _major_ PITA and should be >> avoided even at large costs.  In that light: do you have a plan of action >> of how to never change the soname aga

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-18 Thread Jeff Law
On 06/16/2012 12:46 PM, Michael Matz wrote: A soname change for a basic system library is a _major_ PITA and should be avoided even at large costs. In that light: do you have a plan of action of how to never change the soname again, at least on targets where that is reasonably possible with sy

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-18 Thread Gabriel Dos Reis
On Mon, Jun 18, 2012 at 3:46 AM, Jonathan Wakely wrote: > The problems arise when user code that uses the "inline-only" code is > linked to other user-code that has a different definition of that > inline-only code. Indeed. A related question is whether for GCC-4.8 we should still continue to c

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-18 Thread Jonathan Wakely
On 18 June 2012 08:52, Stephan Bergmann wrote: > On 06/15/2012 10:12 PM, James Y Knight wrote: >> >> Whether or not this particular incompatibility was intended or not, the >> point remains. You cannot say that GCC devs are taking the C++11 binary >> incompatibility issue seriously while: >> a) th

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-18 Thread Stephan Bergmann
On 06/15/2012 10:12 PM, James Y Knight wrote: Whether or not this particular incompatibility was intended or not, the point remains. You cannot say that GCC devs are taking the C++11 binary incompatibility issue seriously while: a) there exist serious ABI incompatibilities between the modes. b) t