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

Re: [MiNT] [Highwire] gcc4



Hi,

On Monday 06 September 2010, m0n0 wrote:
> Am Sonntag, den 05.09.2010, 23:23 +0200 schrieb Eero Tamminen
> > If something is defined as const, GCC may be doing optimizations
> > that actually assume its contents not to be changing...  It would
> > be much better to use corrent types from the beginning instead of
> > kluding things using casts.
>
> Yes, but many C functions expect char *, so if you wan't to pass
> something that is defined as const char * you have to cast.

Hm, it might be more of an issue for C++ code.  See for example:
http://gcc.gnu.org/onlinedocs/gcc/Temporaries.html#Temporaries


GCC non-bugs doc is also interesting to read:
	http://gcc.gnu.org/bugs/#known

It e.g. tells about how to use and not to use the increment/decrement
operators...


	- Eero