This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Discuss please

char * The_Function ( int Element_Count , char Padding )

{
  char Store [ Element_Count ];

  memset ( Store , Element_Count , Padding );

  return &Store[ 0 ];
}

Parents
  • "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.

Reply
  • "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.

Children