On Wed, Jan 10, 2018 at 09:02:46PM -0500, Rich Felker wrote: > On Thu, Jan 11, 2018 at 11:43:05AM +1100, Peter Wang wrote: > > Hi, > > > > I'm not certain it is a bug, but this program produces "00" instead of "0": > > > > #include > > int main(void) > > { > > printf("%#o\n", 0); > > return 0; > > } > > > > Please Cc: any replies as I am not subscribed to this list. > > Indeed, this is a bug. I'm not sure whether it was introduced in > commit 78897b0dc00b7cd5c29af5e0b7eebf2396d8dce0 or already present, > but it was not present in Dmitry Levin's original more complex version > of the patch. I'm going to essentially revert this commit and replace > it with an alternate one-line fix using infrastructure that wasn't > available at the time but added later in commit > 167dfe9672c116b315e72e57a55c7769f180dffa. > > Thanks for the report. Here's the patch I'm going to push if I don't find any problems with it. Rich