About the problem of breakpoint setting you have to consider two aspects.
If an automatic variable declaration happens at start of a function the space on the stack is overall reserved for all module's automatic variables with a single instruction (sub esp,<space in bytes> for 32 bits machine). This is normally considered part of function entry prologue.
In this case as BitBeisser explained no specific instruction is generated and you cannot set a breakpoint on variable declaration.
The situation is different when an automatic variable is declared in the middle of the module, or more generally in a conditional contex that could be optimized away. In this case the variable is automatically allocated extending the stack. To do this the compiler inserts the intructions required for dynamic allocation allowing to break over the variable declaration. You can check this modifyng the code this way:
int main( void )
{
int size = 10 ;
printf("start") ;
for( int volatile i = 0 ; i <= 0 ; i++ )
{
printf("woot!") ;
int array[size] ; //You can set a breakpoint here now, and even debug
array[i]=i; //We *have to* add some op on the array or the optimizer
//will cut off array creation
//printf("add me to the code, to get a unable to set breakpoint warning") ;
}
printf("end") ;
return 0 ;
}
As already explained in the sample we have to do something on the array or the optimizer will remove it anyway.
The conclusions can be PellesC has a strong optimizer.....
I hope someone find this clarification of any interest