RE: a nifty feature for c preprocessor

2012-01-01 Thread R A
i don't know if you're trying to be funny... but what's between the definition of N1 and the undef of A may be a very complex. it's just simplified for demonstration. > Date: Sun, 1 Jan 2012 00:42:16 -0500 > From: de...@adacore.com > To: ren_zokuke...@ho

RE: a nifty feature for c preprocessor

2012-01-01 Thread Richard Kenner
> i don't know if you're trying to be funny... > > but what's between the definition of N1 and the undef of A may be a very > complex. it's just simplified for demonstration. It's not good programming practice to have a macro (in this case A) have two different values, with an #undef between then

Re: a nifty feature for c preprocessor

2012-01-01 Thread David Brown
On 31/12/11 10:44, R A wrote: alright, here's another example why eval is a good idea: #define A 17 #define B 153 #define N1 ((A + B)/2) /* intended was (17 + 153)/2 */ #undef A #define A 230 #define N2 ((A + B)/2) /* intended was (230 + 153)/2 */ prin

Re: a nifty feature for c preprocessor

2012-01-01 Thread Ruben Safir
On 01/01/2012 12:42 AM, Robert Dewar wrote: On 12/31/2011 4:44 AM, R A wrote: alright, here's another example why eval is a good idea: #define A 17 #define B 153 #define N1 ((A + B)/2) /* intended was (17 + 153)/2 */ #undef A #define A 230 #define N2

Re: LTO multiple definition failures

2012-01-01 Thread Andi Kleen
Sandra Loosemore writes: > > I'm still finding my way around LTO; can anyone who's more familiar > with this help narrow down where to look for the cause of this? I > don't even know if this is a compiler or ld bug at this point. I'm I would look into the interaction between the LTO plugin and