------- Comment #1 from kargl at gcc dot gnu dot org 2009-09-24 14:19 ------- This is probably related to a difference between gfc_warning and gfc_warning_now. If you look in parse.c, you'll see free-form and fixed-form code behave differently. For fixed-form, no warning is issued. This patch fixes the fixed-form non-warning case. It also gives a better locus.
Index: parse.c =================================================================== --- parse.c (revision 151785) +++ parse.c (working copy) @@ -655,7 +655,7 @@ next_free (void) if (gfc_match_eos () == MATCH_YES) { gfc_warning_now ("Ignoring statement label in empty statement " - "at %C"); + "at %L", &label_locus); gfc_free_st_label (gfc_statement_label); gfc_statement_label = NULL; return ST_NONE; @@ -848,7 +848,8 @@ next_fixed (void) blank_line: if (digit_flag) - gfc_warning ("Ignoring statement label in empty statement at %C"); + gfc_warning_now ("Ignoring statement label in empty statement at %L", + &label_locus); gfc_current_locus.lb->truncated = 0; gfc_advance_line (); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41459