if (gfc_option.flag_backslash && c == '\\')
{
+ int tmp;
locus 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;
+ /* Use a temp variable to avoid side effects from gfc_match_special_char
+ since it uses an int * for its argument. */
+ tmp = (int)c;
- default:
- /* Unknown backslash codes are simply not expanded. */
- gfc_current_locus = old_locus;
- break;
- }
+ if (gfc_match_special_char (&tmp) == MATCH_NO)
+ gfc_current_locus = old_locus;
+
+ c = (char)tmp;
if (!(gfc_option.allow_std & GFC_STD_GNU) && !inhibit_warnings)
gfc_warning ("Extension: backslash character at %C");
use_last_char = 1;
}
-/* Eat up the spaces and return a character. */
+/* Eat up the spaces and return a character. */
static char
next_char_not_space (void)