This modifies Clang to reflect that under pre-C99 ISO C, decimal
constants may have type unsigned long even if they do not contain u
or U in their suffix (C90 subclause 6.1.3.2 paragraph 5). The same is
done for C++ without C++11 which--because of undefined behaviour--allows
for behaviour compatible with ISO C90 in the case of an unsuffixed
decimal literal and is otherwise identical to C90 in its treatment of
integer literals (C++03 subclause 2.13.1 [lex.icon] paragraph 2).
Messages are added to the c99-compat and c++11-compat groups to warn
on such literals, since they behave differently under the newer
standards.
Fixes PR 16678.
In C++98, this should probably be an ExtWarn rather than a Warning, because this case has undefined behavior. Splitting this into two warnings would also allow you to put the warning into -Wc99-compat or -Wc++11-compat as appropriate, and to indicate that the C++98 case has undefined behavior.