help-gplusplus
[Top][All Lists]
Advanced

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

Re: ansi c++ type checking issue


From: Paul Pluzhnikov
Subject: Re: ansi c++ type checking issue
Date: Wed, 16 May 2007 07:30:27 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

georgekadaplackel@gmail.com writes:

> I was initially using CCSparc compiler for compiling C++.

There is no such compiler. You probably mean SUNWspro CC, aka Sun
Studio, aka Sun Workshop.

> Now I have swiched to gcc compiler .2.95.2 .

That's a completely wrong thing to do: that compiler is ancient
and obsolete, and should not be used today. You should switch to
current gcc-4.1.2 instead.

> Now I am getting errors in the stack which was already compiling with
> CCSparc .

Ok, so you have buggy code.

> It is doing strict type checking . type casting on void
> pointers all such stuffs , checking for void parameter in methods
> explicitly

Good. When you use gcc-4.1.2, it will reject even more bad code.
The good news: once your code compiles with gcc-4.x, it will be
pretty standards-compliant, and will compile on future releases
(or with different compilers) with little problems.

> I tried removing errors in some files w.r.t errors ... it is compiling
> properly .Since the stack is huge it is not easy to do modification in
> each module.

Tough. Stay with obsolete compiler, or fix your code.

> Is there any option to switch off this while using gnu c++  compiler ...
> to turn off ansi c++ restrictions ...

No.

> I tried few like -ansi  etc .... But in vain ...

The '-ansi' makes compiler even *more* restrictive. Of course it
didn't help.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]