]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/fortran/primary.c
re PR fortran/32223 (Backslash handling inconsistent)
[thirdparty/gcc.git] / gcc / fortran / primary.c
index ce81f44fd2d1da36a3c594e29222088ad7911a6b..90b1d6840e4e55c3d60abd0c6604b3dc9f2ff663 100644 (file)
@@ -732,38 +732,8 @@ next_string_char (char delimiter)
     {
       old_locus = gfc_current_locus;
 
-      switch (gfc_next_char_literal (1))
-       {
-       case 'a':
-         c = '\a';
-         break;
-       case 'b':
-         c = '\b';
-         break;
-       case 't':
-         c = '\t';
-         break;
-       case 'f':
-         c = '\f';
-         break;
-       case 'n':
-         c = '\n';
-         break;
-       case 'r':
-         c = '\r';
-         break;
-       case 'v':
-         c = '\v';
-         break;
-       case '\\':
-         c = '\\';
-         break;
-
-       default:
-         /* Unknown backslash codes are simply not expanded */
-         gfc_current_locus = old_locus;
-         break;
-       }
+      if (gfc_match_special_char (&c) == MATCH_NO)
+       gfc_current_locus = old_locus;
 
       if (!(gfc_option.allow_std & GFC_STD_GNU) && !inhibit_warnings)
        gfc_warning ("Extension: backslash character at %C");