This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/40588] Small bug in match_charkind_name



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]