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

[MiNT] Some comments on GCC 4



Hello,

With the help of MiKRO I installed GCC 4.2.3 on my Falcon and compiled 
the CVS mintlib. I then went along to compile my own project (GEM 
MiNTnet client) and I would like to share a few thoughts on the 
process/result.

- the file 'unistd.h' from CVS mintlib caused literally hundreds of 
errors, starting from line 461 (I haven't taken note of which ones 
though). I moved the file and copied over the one from the latest 
official mintlib and the errors went away;

- the folder ../include/sys has been replaced by ../include/bits in CVS. 
Is this normal?

- the -s option given to GCC does not seem to result in stripping the 
binaries.

- the memory consumption of my program has increased from ca.340 KB to 
ca.400.

- the only new warning I had (which may or may not mean that my code is 
clean...) was 'dereferencing type-punned pointer will break 
strict-aliasing rules' on the following line:

Col = (OBJC_COLORWORD *)&Tree[object].ob_spec.tedinfo->te_color;

If I understand correctly, GCC 4 does not like the cast. Is there 
another way to get the colour index of an object than via a cast to 
OBJC_COLORWORD?

Anyway, thanks for the people involved in porting GCC 4 to FreeMiNT.
-- 
Jean-François Lemaire