This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40588] Small bug in match_charkind_name
- 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: 29 Jun 2009 15:17:49 -0000
- Subject: [Bug fortran/40588] Small bug in match_charkind_name
- References: <bug-40588-17820@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2009-06-29 15:17 -------
I agree that
&& (gfc_option.flag_dollar_ok && c != '$'))
is wrong and is should either be
&& !(gfc_option.flag_dollar_ok && c == '$'))
^^^ ^^
or equivalently
&& (!gfc_option.flag_dollar_ok || c != '$'))
^^^ ^^
The current version accepts with -fno-dollar-ok all characters '$', '@" etc.
while for -fdollar-ok only '$' is allowed. However, those lines are in
match_charkind_name. As the variable_"string" is parsed before (in
gfc_match_name), the invalid character is noted before correctly.
Thus
if (!ISALNUM (c) && c != '_' && c != '$')
is equivalent, taking the previous gfc_match_name into account.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40588