https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67192
--- Comment #21 from Andreas Arnez <arnez at linux dot vnet.ibm.com> --- (In reply to Andreas Arnez from comment #20) > Posted a patch that is not as ambitious as completely getting rid of > input_location, but also doesn't require a new function like > c_parser_peek_token_keep_input_location(): > > https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01132.html After investigating this further I recognized that this patch doesn't cover all cases where the backward-goto is wrongly located. Thus I've created a version that basically follows the suggestion from comment #13, to pass an explicit location to c_finish_loop: https://gcc.gnu.org/ml/gcc-patches/2015-10/msg02393.html I haven't checked whether there are still other cases where add_stmt needs to use input_location as the default location for the given statement. It should probably be one goal to get rid of this default handling.