Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
From section 7.21.6.2 of this draft: [T]he result of the conversion is placed in the object pointed to by the first argument following the format argument that has not already received a conve...
Answer
#1: Initial revision
From section 7.21.6.2 of [this draft](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2310.pdf): > [T]he result of the conversion is placed in the object pointed to by the first argument following the `format` argument that has not already received a conversion result. If this object does not have an appropriate type, or if the result of the conversion cannot be represented in the object, the behavior is undefined. So per the spec, it is the type of the *object*, not the *pointer* to the object, that must match the format specifier. A compiler that doesn't interpret the quoted code to have the behavior you saw would on this point not be spec-compliant.