how to convince someone about migrating from gcc-2.95 to gcc-3.x
Hi I work in a company where we have been using gcc-2.95.4 (based cross compiler) for compiling our code. Most of the code is written in c++ and makes extensive use of the stl libraries. We would not be changing our operating system or processor architecture (so portability is not a very good reason to give). There seems to be a lot of changes since gcc-2.95 as a result of which we get a large number of errors when trying to compile the code with gcc-3.x. If we were to put in quite some effort to get the entire code-base compiling in gcc-3.x, what advantages would we get as a result of this (in terms of code-size reduction or faster execution of compiled binaries). Are there any new glibc,libstdc++ (or other libraries) features which are there in 3.x/4.x which are unavailable in 2.95? If you were asked to convince someone about moving from gcc-2.95 to gcc-3.x how would you people do it? Thanks Ganesh Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/
Re: how to convince someone about migrating from gcc-2.95 to gcc-3.x
hi if not for the real compiler as such, what advantages would i get on using newer glibc, libstdc++ ?? would these features be tied to some kernel version linux-2.4 vs 2.6 ( something like thread support). thanks ganesh - Original Message From: Chris Lattner <[EMAIL PROTECTED]> To: Joe Buck <[EMAIL PROTECTED]> Cc: Marcin Dalecki <[EMAIL PROTECTED]>; Paul Brook <[EMAIL PROTECTED]>; gcc@gcc.gnu.org; Dave Korn <[EMAIL PROTECTED]>; ganesh subramonian <[EMAIL PROTECTED]> Sent: Monday, April 2, 2007 11:32:43 AM Subject: Re: how to convince someone about migrating from gcc-2.95 to gcc-3.x On Apr 1, 2007, at 10:42 PM, Joe Buck wrote: > On Sun, Apr 01, 2007 at 02:20:10PM +0200, Marcin Dalecki wrote: >> >> Wiadomość napisana w dniu 2007-04-01, o godz13:58, przez Paul >> Brook: >> >>> If you're already switching compilers, moving to an already >>> obsolete release >>> (3.3) seems a strange choice. At this point I'd recommend >>> skipping 3.x >>> altogether and going straight to gcc4.1/4.2. >>> >>> Many of the improvements in c++ code generation were as a result of >>> tree-ssa, >>> you only get with 4.x. >> >> I wouldn't recommend it. One has to adapt gradually to the patience >> required to >> use the later compiler editions. > > No, one does not have to adapt gradually. It is no harder to > switch from > 2.95 to 4.1.2 than it is to switch from 2.95 to 3.3. Either way, > you'll > have to get out a C++ book, learn C++, and recode your code in > actual C++. > There will be some cases where going to 3.3 will require fewer > changes, > but the majority of the work is going to have to be done anyway. I believe the point being made was about compile times, not conformance. -Chris No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail
relation between gcc/glibc version and linux kernel version??
Hi I have a very basic doubt regarding gcc,binutils and kernel. How closely tied are the linux kernel version and the gcc/glibc versions? and where exactly does binutils come in? What kind of changes usually require that version x of kernel requires version y of binutils and gcc-z. And is there any relation between compiler version used for kernel and application compilation?? For eg: can i run a system with linux-2.4.20 kernel (compiled with gcc-2.95) and have applications compiled with gcc-4 running on it? thanks ganesh No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail
Re: relation between gcc/glibc version and linux kernel version??
Hi For example i hear that native posix threads has portions of it implemented in kernel and also requires glibc support. In such cases if i attempt to run an application compiled with gcc-4 on a linux-2.4 kernel, wont there be problems?? With changes in binutils, would there be changes in the basic elf format itself?? in such case wouldn't the kernel need to know about this? thanks ganesh Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/
dynamic_cast problem
I have this example program below. #include #include using namespace std; class Base { public: Base() {} Base(int aa) { a = aa; } int a; char c; virtual void show() { cout << "a=" << a << endl; } }; class Derived: public Base { public: Derived() {} Derived(int aa,int bb) { a = aa; b= bb; } int b; void show() { cout << "a=" << a << " b=" << b << endl; } }; class Derived2: public Base { public: Derived2() {} Derived2(int aa,int bb) { a = aa; b= bb; } int b; void show() { cout << "a=" << a << " b=" << b << endl; } }; int main(void) { Derived b(1,2); Base *a = (Base*)(&b); Derived *d1 = dynamic_cast(a); if(d1) cout << "cast1 ok\n"; else cout << "cast1 failed\n"; d1 = dynamic_cast((Derived2*)a); if(d1) cout << "cast2 ok\n"; else cout << "cast2 failed\n"; return 0; } Can someone tell me why the cast2 fails but cast1 works? What effect does the cstyle cast have? In one of my old cross compilers (ppc_82xx-g++ gcc version 2.95.4 20010319) both the casts work thanks ganesh Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs