I was going through some code at work and I found this
inline
FLAGS get_flags(void) {
FLAGS res;
memset(&res, 0, sizeof(res));
return res
}
This is declared in a header file included in the program. I realize it would be a very bad thing if it was not inlined as this is allocated on the stack. We have never had problems with the code in question, but I was just curious about it.