mirror of
https://review.haiku-os.org/buildtools
synced 2024-11-23 07:18:49 +01:00
[taken from gcc-2.95.3-latest-cvs]
1999-11-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * c-lex.c (yylex): With -Wtraditional, when the ANSI type of an integer constant does not match the traditional type, limit the warnings to cases where the base of the type is ten. git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9587 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0933b55616
commit
ab0de848b4
@ -1812,7 +1812,11 @@ yylex ()
|
||||
|
||||
type = flag_traditional ? traditional_type : ansi_type;
|
||||
|
||||
if (warn_traditional && traditional_type != ansi_type)
|
||||
/* We assume that constants specified in a non-decimal
|
||||
base are bit patterns, and that the programmer really
|
||||
meant what they wrote. */
|
||||
if (warn_traditional && base == 10
|
||||
&& traditional_type != ansi_type)
|
||||
{
|
||||
if (TYPE_PRECISION (traditional_type)
|
||||
!= TYPE_PRECISION (ansi_type))
|
||||
|
@ -1694,6 +1694,12 @@ A @code{switch} statement has an operand of type @code{long}.
|
||||
@item
|
||||
A non-@code{static} function declaration follows a @code{static} one.
|
||||
This construct is not accepted by some traditional C compilers.
|
||||
|
||||
@item
|
||||
The ANSI type of an integer constant has a different width or signedness
|
||||
from its traditional type. This warning is only issued if the base of
|
||||
the constant is ten. I.e. hexadecimal or octal values, which typically
|
||||
represent bit patterns, are not warned about.
|
||||
@end itemize
|
||||
|
||||
@item -Wundef
|
||||
|
Loading…
Reference in New Issue
Block a user