ANGLE should build with -Wshorten-64-to-32
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2013 18:56:19 +0000 (18:56 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2013 18:56:19 +0000 (18:56 +0000)
commit8e17d136064d37300829b2ec60f4a68981e54661
tree5546e0bc2babea7f55d84c2907aea2962cc1a1e3
parente5b90027536ef27f1a1bafb69d23703313f2fe58
ANGLE should build with -Wshorten-64-to-32
<http://webkit.org/b/106798>
<http://code.google.com/p/angleproject/issues/detail?id=396>

Reviewed by Kenneth Russell.

Most changes below are simply to document issues with #pragma
statements per request by upstream.  The change to osinclude.h
is the only bug fix, which defines OS_TLSIndex in terms of
pthread_key_t instead of unsigned int since pthread_key_t is a
64-bit value on 64-bit Mac OS X.

* Configurations/Base.xcconfig: Enable -Wshorten-64-to-32 by
setting GCC_WARN_64_TO_32_BIT_CONVERSION to YES.
* src/compiler/Intermediate.cpp:
(TIntermTraverser::hash): Add #pragmas for clang to ignore
-Wshorten-64-to-32 warning.
* src/compiler/MapLongVariableNames.cpp:
(LongNameMap::Size): Ditto.
* src/compiler/ShaderLang.cpp:
(getVariableInfo): Ditto.
(ShGetInfo): Ditto.
* src/compiler/ValidateLimitations.cpp:
(ValidateLimitations::validateFunctionCall): Ditto.
* src/compiler/glslang.l: Ditto.
* src/compiler/glslang_lex.cpp: Ditto.
* src/compiler/osinclude.h: Change type of OS_TLSIndex to
pthread_key_t.  Define OS_INVALID_TLS_INDEX by using
static_cast<OS_TLSIndex>(-1).
* src/compiler/preprocessor/Input.cpp:
(pp::Input::Input): Add #pragmas for clang to ignore
-Wshorten-64-to-32 warning.
* src/compiler/preprocessor/Tokenizer.cpp: Ditto.
* src/compiler/preprocessor/Tokenizer.l: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/Configurations/Base.xcconfig
Source/ThirdParty/ANGLE/src/compiler/Intermediate.cpp
Source/ThirdParty/ANGLE/src/compiler/MapLongVariableNames.cpp
Source/ThirdParty/ANGLE/src/compiler/ShaderLang.cpp
Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.cpp
Source/ThirdParty/ANGLE/src/compiler/glslang.l
Source/ThirdParty/ANGLE/src/compiler/glslang_lex.cpp
Source/ThirdParty/ANGLE/src/compiler/osinclude.h
Source/ThirdParty/ANGLE/src/compiler/preprocessor/Input.cpp
Source/ThirdParty/ANGLE/src/compiler/preprocessor/Tokenizer.cpp
Source/ThirdParty/ANGLE/src/compiler/preprocessor/Tokenizer.l