------- Comment #14 from mikael at gcc dot gnu dot org  2009-09-11 20:39 -------
With this:

Index: scanner.c
===================================================================
--- scanner.c   (revision 151461)
+++ scanner.c   (working copy)
@@ -1274,6 +1274,16 @@
 }


+char
+gfc_next_ascii_char_litteral (void)
+{
+  gfc_char_t c = gfc_wide_tolower(gfc_next_char_literal (0));
+  
+  return (gfc_wide_fits_in_byte (c) ? (unsigned char) c : 
+                                     (unsigned char) UCHAR_MAX);
+}
+
+
 gfc_char_t
 gfc_peek_char (void)
 {
Index: match.c
===================================================================
--- match.c     (revision 151461)
+++ match.c     (working copy)
@@ -522,7 +522,7 @@
   old_loc = gfc_current_locus;
   gfc_gobble_whitespace ();

-  c = gfc_next_ascii_char ();
+  c = gfc_next_ascii_char_litteral ();
   if (!(ISALPHA (c) || (c == '_' &&
gfc_option.flag_allow_leading_underscore)))
     {
       if (gfc_error_flag_test() == 0 && c != '(')
@@ -544,7 +544,7 @@
        }

       old_loc = gfc_current_locus;
-      c = gfc_next_ascii_char ();
+      c = gfc_next_ascii_char_litteral ();
     }
   while (ISALNUM (c) || c == '_' || (gfc_option.flag_dollar_ok && c == '$'));



I get:

pr41335.f:3.23:

        volatile double precision a                                     
                       1
Error: Syntax error in VOLATILE statement at (1)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41335

Reply via email to