char * The_Function ( int Element_Count , char Padding ) { char Store [ Element_Count ]; memset ( Store , Element_Count , Padding ); return &Store[ 0 ]; }
"Three lines of code in the body and not one line correct."
With the Arm compiler and --C99 option and maximum warnings, I can compile the function without errors.
Ok. I have to include string.h and the return value is obviously nonsense, and there is another parameter error, but it compiles without warning or error.
No good with C51, since it does not support much (any) of C99.
en.wikipedia.org/.../99_Flake
Take for example a closer look at the parameter order for the memset() call - the compiler can't see this problem...
... software
Nope, didn't when I tried it here.
Clearly it's wrong - as in unintentional.