------- Comment #8 from burnus at gcc dot gnu dot org  2007-11-26 22:54 -------
I just committed Steve's patch. Now gfortran uses -fno-backslash by default.

Now we only need to improve the warning:

For C gcc warns for:

  char c[] = "\w";

a.c:3:14: warning: unknown escape sequence '\w'

gfortran should do likewise in match.c's gfc_match_special_char. Actually, we
do not fully support all C escape sequences (see "5.2.2 Character display
semantics", "6.4.4.4 Character constants" and "6.4.3 Universal character
names"); missing are:

- trigraphs (I don't think anyone misses them)
- \" and \'  (use "" or '' instead)
- \?  (use ?)
- \o, \oo \ooo  (o = octal digit) - except of \0
- \xh, \xhh (h = hexadecimal digit)
- \uhhhh, \Uhhhhhhhh (h = hexadecimal digit)

I don't know whether we really need to implement them, but at least we should
document what we have. A proper documentation would be something like Intel's
http://www.intel.com/software/products/compilers/docs/flin/main_for/index.htm


-- 


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

Reply via email to