This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: add/assign problem, part 2.
- From: Andrew Haley <aph at gcc dot gnu dot org>
- To: DCH <david at carter-hitchin dot clara dot co dot uk>
- Cc: David Mebane <david dot mebane at mse dot gatech dot edu>, gcc-help at gcc dot gnu dot org
- Date: Mon, 1 Jan 2007 11:42:43 +0000
- Subject: Re: add/assign problem, part 2.
- References: <1167585956.4597f2a4add1b@webmail.mail.gatech.edu> <7.0.1.0.0.20061231173507.021f43e8@carter-hitchin.clara.co.uk>
DCH writes:
> Hi David,
>
> I think you've got a coding error, not a compiler error. Make sure
> you're not using any optimizations (i.e. no -01,2 or 3 switches) as
> these switches can often "magnify" errors such as the one you're
> getting. Obviously it's not a solution to just leave optimization
> off, but it might help you track down where the problem is.
>
> I haven't actually compiled up your program, but immediately alarm
> bells are ringing when I see things like
>
> a = *(vec + i)
It's just a nonstandard way to write vec[i]. I mean, it's weird, but
it's not actually wrong. :-)
Andrew.