------- Comment #2 from burnus at gcc dot gnu dot org 2008-01-28 17:09 ------- Thanks for the pointer. I think we need in general to update some of the error message to point to the relevant option. (For the most common, namely "-fno-range-check" we do so already; for -std=f* related ones we partially do ("Fortran 2003", "Extension:") though I think not consistently -std=legacy.)
For $ I think the following should be OK for 4.4.0. Index: match.c =================================================================== --- match.c (Revision 131899) +++ match.c (Arbeitskopie) @@ -519,6 +519,13 @@ gfc_match_name (char *buffer) } while (ISALNUM (c) || c == '_' || (gfc_option.flag_dollar_ok && c == '$')); + if (c == '$' && !gfc_option.flag_dollar_ok) + { + gfc_error ("Invalid '$' character at %C. Use -fdollar-ok to accept it"); + return MATCH_ERROR; + } + + buffer[i] = '\0'; gfc_current_locus = old_loc; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34997