Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is that allowed by the standard? (Passing a parameter to `printf` but not referencing it, in the non-"%d\n" case?)


C11 §7.21.6.1

  If the format is exhausted while arguments remain, the excess
  arguments are evaluated (as always) but are otherwise ignored.
but that's just a consequence of stdarg, which does not require all supplied arguments to be consumed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: