don't warn about multichar constants when they are exactly 4 characters long.

This commit is contained in:
Wolfgang Thaller 2015-07-21 00:41:58 +02:00
parent 0db322e4a0
commit ae4d8353b9

View File

@ -1511,7 +1511,7 @@ narrow_str_to_charconst (cpp_reader *pfile, cpp_string str,
cpp_error (pfile, CPP_DL_WARNING,
"character constant too long for its type");
}
else if (i > 1 && CPP_OPTION (pfile, warn_multichar))
else if (i > 1 && i != 4 && CPP_OPTION (pfile, warn_multichar))
cpp_warning (pfile, CPP_W_MULTICHAR, "multi-character character constant");
/* Multichar constants are of type int and therefore signed. */