Re: Finally one site with all the C fundas



On Jun 10, 4:59 pm, j...@xxxxxxxxxxx (Jens Thoms Toerring) wrote:
parag_p...@xxxxxxxxxxx <parag_p...@xxxxxxxxxxx> wrote:
Since in a recent update to QSCB we found out that since the gcc 3.3.6
was pretty lenient and we did not actively pursue compiling the tool
in AIX, we had many bugs in our code that gcc 3.3.6 allowed and we had
to do a thorough code check for all the stuff again
like
1. 3.3.6 allowing a strcuture element to be laid across word
boundaries

May be due to the machine having a different architecture where
the CPU/memory architecture doesn't allow unaligned accesses.

2. it allowed no return calls from void functios

Also gcc 3.3.6 would have spotted that if invoked with the '-W'
and '-Wall' option. I just can recommend not to use code that
doesn't compile cleanly with these flags set (except for things
that you have checked are safe) - saves a lot of time later
on as you found out the hard way;-)

3. non casting of the pointer from malloc was allowed.

Huh? Casting the return value of malloc() is never necessary
in C and casting only will hide a deeper problem, i.e. forget-
ting to include <stdlib.h>. Or are you talking about C++?

4. it had relaxed semantics for linking too.

But that's nothing related to the C (or C++) part.

Please accept it as a museum for old questions that have been
discussed for a long time.

But a few of them could use a work-over since what help is it
to others if they read (and perhaps believe) something which
is wrong?
                               Regards, Jens
--
  \   Jens Thoms Toerring  ___      j...@xxxxxxxxxxx
   \__________________________      http://toerring.de

hi Jens
I am very happy that you did not straight away bulldozed my idea
flat.
I am willing to make the changes , I will find out the appropriate
solutions and get all of them updated in time.
i am expecitn direct comments and personal search too.
We are not purging every wrong material online , are we?
But a chance to improve will definitely make this valuable with time.
I have been a part of google groups since it took over usenet, or ( in
proper lingo ) it acquired the old mails and discussions.
So I will preserve the sanctity of the whole setup and just ask help
from you.
.



Relevant Pages

  • Re: Finally one site with all the C fundas
    ... was pretty lenient and we did not actively pursue compiling the tool ... the CPU/memory architecture doesn't allow unaligned accesses. ... Also gcc 3.3.6 would have spotted that if invoked with the '-W' ... Casting the return value of mallocis never necessary ...
    (comp.lang.c)
  • Re: Anyone interested in building a vms-like OS?
    ... then you have a good reason for preferring the BSD license over GPL. ... geeks :-) is that it is fast, 5-10 times faster than gcc, while still ... Compiling 10 times faster with almost no optimization does not ... It is compiling much faster but doing less optimizations. ...
    (comp.os.vms)
  • Conexant HCF Modem Problems
    ... Conexant HCF modem, which is a "controllerless" modem, not a HSF which ... files to compile and to install but the problem is when I try to config ... compiling (gcc) mod_osspec.c ...
    (comp.os.linux.hardware)
  • [ANN] macstl 0.1.5 -- Xcode compatibility
    ... The new version also has fixes for older gcc ... Now builds with Xcode 1.0. ... Fixed altivec functions not compiling in gcc 3.1: ...
    (comp.lang.cpp)
  • Re: A bug in gnat/gcc 3.3.3?
    ... > Compiling ASIS and GLADE for a newer version isn't that difficult - ... harping on GCC 3.4, but I'd like reports about ASIS and GLADE for GCC ... GCC 3.4 does not "have" PolyORB, ...
    (comp.lang.ada)