Bug#1059873: 12.14.5 String Input Conversions: The meaning of ‘%[\0a]’ conversion is unclear
It is not clear whether the format string "%[\0a]" matches the input
string "a" or not. I interpret the documentation as saying that once
the selector "%[ " has been opened, the format interpreter must find a
matching "]", therefore it must not interpret the embedded "\0" as the
end of the format string. However, trying to use such a format string
causes the compiler to report the warning "format contains NUL", which
suggests that using such a format string involves undefined behaviour.
Reply to: