avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] local variables in ddd


From: Javier Almansa Sobrino
Subject: Re: [avr-gcc-list] local variables in ddd
Date: Tue, 22 Jan 2008 10:54:25 +0100

On Mon, 21 Jan 2008 13:25:49 -0500
Andrew Hutchinson <address@hidden> wrote:

> It is possible that you have optimization turned on - so gcc will put 
> variables into register.
> 
> Or, perhaps your code has used variables it did not need and gcc will 
> optimise them away.
> For example:
> 
> int i
> for (i=0;i<1000;i++);
> 
> will dissappear.
> 
> -O0 (or optimisation 0) will stop this but code will be huge.
> 
> -O0 is ok  for debugging, but for goodness sake use O2 or Os before 
> release. No attempt is made at O0 to
> create anything pretty.
> 
> -O3 and inline optimisation are very powerful and will rip out large 
> chunks of code that don't do anything.
> 
> If you think thi is not the reason, post copy of code with problem
> 
> Andy

Ok, that was my problem.
Thanks very much.

-- 
Nunca confies en un S.O. del que no tienes código fuente ;-)

--------------------------------
Javier Almansa Sobrino.
Ingeniero Técnico en Informática de Sistemas.

Grupo de Investigación ARCo.
Escuela Superior de Informática. Ciudad Real
Tel: (+34)926 29 53 00 Ext: 3705





reply via email to

[Prev in Thread] Current Thread [Next in Thread]