[Bug c/70952] Missing warning for likely-erroneous octal escapes in string literals

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 4 17:27:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70952

--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Octal escapes have no more than three digits by definition, so "\0009" clearly
doesn't fall under this warning.

Upon further testing, there's no diagnostic for

const char c = '\9'; /* same as ... = 9; */

Surely that's a bug? It is diagnosed (with a warning) inside of string
literals.


More information about the Gcc-bugs mailing list