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

Re: [MiNT] [Highwire] gcc4



Hi,

On Monday 06 September 2010, m0n0 wrote:
> > error: cast discards qualifiers from pointer target type
> >
> > something to do with volatiles.
>
> Most time you get this "error" is because you pass an "const char * "
> to an function that needs an char*...
> So doing that cast manually should make gcc happy.

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.


	- Eero