Re: Compiling expressions

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

 



On Sat, 2007-12-15 at 15:11 -0200, Antonio Eduardo Fermiano wrote:
> This is the third newbie question I make here, but...
> 
> If I put, for example:
> 
> variable = 1 + 2;
> 
> gcc will compile the code for the CPU add one to two and put in
> variable, in execution time, or will substitute and in the compiled
> code the equivalent of:
> 
> variable  = 3;
> 
> would be inserted?
> 
> If it evaluate expressions like this before compiling, it always is
> done? Or I would need some directive to ask gcc to evaluate it for me
> before compiling?

i think you can search "constant folding" for more information

> 
> Thank you :)


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux