Anyone from the C undefined behavior police reading this? Is this valid code? It passes a null to a string arg in vprintf via a va_list. In printf, a null for %s crashes with gcc. But with vprintf, it just adds "(null)" and does not crash. https://bpa.st/UY3A @dalias @regehr maybe?
View paste UY3A

@hanno @dalias @regehr Not a C language lawyer, but I've been going through the standard on another mission. (1/n)

@hanno @dalias @regehr Looking at n3220, we find:

* vprintf is equivalent to printf, with the variable argument list replaved by the va_list (7.23.6.10.2)
* printf(...) is equivalent to fprintf(stdout, ...) (7.23.6.3.2)
* fprintf's "%s" conversion SHALL (in the absence of an l modifier) be a pointer to storage of character type that SHALL (if no precision is given) contain a NULL character (6.23.6.1) (2/n)

@hanno @dalias @regehr

Since "a "shall" or "shall not" requirement that appears outside of a constraint is violated" (J.2, informational), that constitutes undefined behaviour, in my opinion. (n/n)