This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34997] Common vendor extension: Support symbol names containing $
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2008 17:09:57 -0000
- Subject: [Bug fortran/34997] Common vendor extension: Support symbol names containing $
- References: <bug-34997-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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