The Old New Thing

Things that can happen when your kitchen gets taken over by others

Today is the Thanksgiving holiday in the United States, one of the the major holidays for family get-togethers. (Another big one is Christmas.) One year, it was our family's turn to host Thanksgiving, and when that happens, it means that the kitchen is overrun by relatives cooking all the dishes and hunting through the cabinets and drawers of ...

If you try to declare a variadic function with an incompatible calling convention, the compiler secretly converts it to cdecl

Consider the following function on an x86 system: The function declares itself as , which is a callee-clean convention. But a variadic function cannot be callee-clean since the callee does not know how many parameters were passed, so it doesn't know how many it should clean. The Microsoft Visual Studio C/C++ compiler resolves this ...