I'm trying to use a for loop to incorperate a dead band in to power switching application how ever the only way that the for loop with actually show any effect is ifthe variable is a float, if I try and use int even if I do "for(int i=0;i<35000;i++);" it won't delay the switching at all, however if iuse float,
"for(float i=0;i<75;i++);" i get the same result as using delayMicroseconds(30);.
Anyone have any ideas why its not letting the int version work?
Yes, GCC removes loops with no effect. If you want a timing loop you need something in the loop that the compiler will not remove. If you make the loop index volatile or static/global it can have other effects if you use that variable elsewhere. That being said, I suspect most Arduino code is not performance heavy.