Upstream various build fixes from WebKit to ANGLE to make updating ANGLE in WebKit easier.
a) http://trac.webkit.org/changeset/127747
b) http://trac.webkit.org/changeset/128539
c) http://trac.webkit.org/changeset/122870 - Specifically, items #3 and #4 in this changeset's commit message.
Review URL: https://codereview.appspot.com/7040045
Author: maxvujovic@gmail.com
------
Upodate preprocessor.vcxproj to reflect changes in r1640.
Review URL: https://codereview.appspot.com/7061044
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1703 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/BaseTypes.h b/src/compiler/BaseTypes.h
index 5f83185..af4c7e3 100644
--- a/src/compiler/BaseTypes.h
+++ b/src/compiler/BaseTypes.h
@@ -16,7 +16,7 @@
EbpUndefined,
EbpLow,
EbpMedium,
- EbpHigh,
+ EbpHigh
};
inline const char* getPrecisionString(TPrecision p)
@@ -47,7 +47,7 @@
EbtGuardSamplerEnd, // non type: see implementation of IsSampler()
EbtStruct,
EbtAddress, // should be deprecated??
- EbtInvariant, // used as a type when qualifying a previously declared variable as being invariant
+ EbtInvariant // used as a type when qualifying a previously declared variable as being invariant
};
inline const char* getBasicString(TBasicType t)
@@ -114,7 +114,7 @@
EvqFragData,
// end of list
- EvqLast,
+ EvqLast
};
//
diff --git a/src/compiler/Diagnostics.h b/src/compiler/Diagnostics.h
index 43dfcb7..cb71bb1 100644
--- a/src/compiler/Diagnostics.h
+++ b/src/compiler/Diagnostics.h
@@ -7,7 +7,7 @@
#ifndef COMPILER_DIAGNOSTICS_H_
#define COMPILER_DIAGNOSTICS_H_
-#include "compiler/preprocessor/Diagnostics.h"
+#include "compiler/preprocessor/DiagnosticsBase.h"
class TInfoSink;
diff --git a/src/compiler/DirectiveHandler.h b/src/compiler/DirectiveHandler.h
index a08b7a8..95ca59d 100644
--- a/src/compiler/DirectiveHandler.h
+++ b/src/compiler/DirectiveHandler.h
@@ -9,7 +9,7 @@
#include "compiler/ExtensionBehavior.h"
#include "compiler/Pragma.h"
-#include "compiler/preprocessor/DirectiveHandler.h"
+#include "compiler/preprocessor/DirectiveHandlerBase.h"
class TDiagnostics;
diff --git a/src/compiler/ExtensionBehavior.h b/src/compiler/ExtensionBehavior.h
index 6040980..5c1595f 100644
--- a/src/compiler/ExtensionBehavior.h
+++ b/src/compiler/ExtensionBehavior.h
@@ -16,7 +16,7 @@
EBhEnable,
EBhWarn,
EBhDisable,
- EBhUndefined,
+ EBhUndefined
} TBehavior;
inline const char* getBehaviorString(TBehavior b)
diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseHelper.cpp
index 6ab99fe8..7e5fcec 100644
--- a/src/compiler/ParseHelper.cpp
+++ b/src/compiler/ParseHelper.cpp
@@ -33,7 +33,7 @@
enum {
exyzw,
ergba,
- estpq,
+ estpq
} fieldSet[4];
for (int i = 0; i < fields.num; ++i) {
diff --git a/src/compiler/glslang.y b/src/compiler/glslang.y
index 39c9cee..7cd4977 100644
--- a/src/compiler/glslang.y
+++ b/src/compiler/glslang.y
@@ -38,6 +38,9 @@
#include "compiler/ParseHelper.h"
#include "GLSLANG/ShaderLang.h"
+#define YYENABLE_NLS 0
+#define YYLTYPE_IS_TRIVIAL 1
+
#define YYLEX_PARAM context->scanner
%}
diff --git a/src/compiler/glslang_lex.cpp b/src/compiler/glslang_lex.cpp
index 66ae97e..f651df1 100644
--- a/src/compiler/glslang_lex.cpp
+++ b/src/compiler/glslang_lex.cpp
@@ -68,6 +68,7 @@
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
+typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -191,6 +192,11 @@
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -204,7 +210,7 @@
*/
#define YY_LESS_LINENO(n) \
do { \
- int yyl;\
+ yy_size_t yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
--yylineno;\
@@ -226,11 +232,6 @@
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -248,7 +249,7 @@
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -327,7 +328,7 @@
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -378,7 +379,7 @@
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (yy_size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
@@ -843,8 +844,8 @@
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -897,7 +898,7 @@
void yyset_out (FILE * out_str ,yyscan_t yyscanner );
-int yyget_leng (yyscan_t yyscanner );
+yy_size_t yyget_leng (yyscan_t yyscanner );
char *yyget_text (yyscan_t yyscanner );
@@ -966,7 +967,7 @@
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1125,7 +1126,7 @@
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- int yyl;
+ yy_size_t yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
@@ -1963,7 +1964,7 @@
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1977,7 +1978,7 @@
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2008,7 +2009,7 @@
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -2133,7 +2134,7 @@
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -2157,7 +2158,7 @@
case EOB_ACT_END_OF_FILE:
{
if ( yywrap(yyscanner ) )
- return EOF;
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -2420,7 +2421,7 @@
*/
static void yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -2518,12 +2519,11 @@
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -2673,7 +2673,7 @@
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int yyget_leng (yyscan_t yyscanner)
+yy_size_t yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
diff --git a/src/compiler/glslang_tab.cpp b/src/compiler/glslang_tab.cpp
index 046b40f..7c47ec3 100644
--- a/src/compiler/glslang_tab.cpp
+++ b/src/compiler/glslang_tab.cpp
@@ -91,6 +91,9 @@
#include "compiler/ParseHelper.h"
#include "GLSLANG/ShaderLang.h"
+#define YYENABLE_NLS 0
+#define YYLTYPE_IS_TRIVIAL 1
+
#define YYLEX_PARAM context->scanner
@@ -657,27 +660,27 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 165, 165, 200, 203, 216, 221, 226, 232, 235,
- 314, 317, 418, 428, 441, 449, 549, 552, 560, 564,
- 571, 575, 582, 588, 597, 605, 660, 667, 677, 680,
- 690, 700, 721, 722, 723, 728, 729, 738, 750, 751,
- 759, 770, 774, 775, 785, 795, 805, 818, 819, 829,
- 842, 846, 850, 854, 855, 868, 869, 882, 883, 896,
- 897, 914, 915, 928, 929, 930, 931, 932, 936, 939,
- 950, 958, 985, 990, 997, 1035, 1038, 1045, 1053, 1074,
- 1095, 1106, 1135, 1140, 1150, 1155, 1165, 1168, 1171, 1174,
- 1180, 1187, 1190, 1212, 1230, 1254, 1277, 1281, 1299, 1307,
- 1339, 1359, 1448, 1457, 1480, 1483, 1489, 1497, 1505, 1513,
- 1523, 1530, 1533, 1536, 1542, 1545, 1560, 1564, 1568, 1572,
- 1581, 1586, 1591, 1596, 1601, 1606, 1611, 1616, 1621, 1626,
- 1632, 1638, 1644, 1649, 1654, 1663, 1672, 1677, 1690, 1690,
- 1704, 1704, 1713, 1716, 1731, 1767, 1771, 1777, 1785, 1801,
- 1805, 1809, 1810, 1816, 1817, 1818, 1819, 1820, 1824, 1825,
- 1825, 1825, 1835, 1836, 1840, 1840, 1841, 1841, 1846, 1849,
- 1859, 1862, 1868, 1869, 1873, 1881, 1885, 1895, 1900, 1917,
- 1917, 1922, 1922, 1929, 1929, 1937, 1940, 1946, 1949, 1955,
- 1959, 1966, 1973, 1980, 1987, 1998, 2007, 2011, 2018, 2021,
- 2027, 2027
+ 0, 168, 168, 203, 206, 219, 224, 229, 235, 238,
+ 317, 320, 421, 431, 444, 452, 552, 555, 563, 567,
+ 574, 578, 585, 591, 600, 608, 663, 670, 680, 683,
+ 693, 703, 724, 725, 726, 731, 732, 741, 753, 754,
+ 762, 773, 777, 778, 788, 798, 808, 821, 822, 832,
+ 845, 849, 853, 857, 858, 871, 872, 885, 886, 899,
+ 900, 917, 918, 931, 932, 933, 934, 935, 939, 942,
+ 953, 961, 988, 993, 1000, 1038, 1041, 1048, 1056, 1077,
+ 1098, 1109, 1138, 1143, 1153, 1158, 1168, 1171, 1174, 1177,
+ 1183, 1190, 1193, 1215, 1233, 1257, 1280, 1284, 1302, 1310,
+ 1342, 1362, 1451, 1460, 1483, 1486, 1492, 1500, 1508, 1516,
+ 1526, 1533, 1536, 1539, 1545, 1548, 1563, 1567, 1571, 1575,
+ 1584, 1589, 1594, 1599, 1604, 1609, 1614, 1619, 1624, 1629,
+ 1635, 1641, 1647, 1652, 1657, 1666, 1675, 1680, 1693, 1693,
+ 1707, 1707, 1716, 1719, 1734, 1770, 1774, 1780, 1788, 1804,
+ 1808, 1812, 1813, 1819, 1820, 1821, 1822, 1823, 1827, 1828,
+ 1828, 1828, 1838, 1839, 1843, 1843, 1844, 1844, 1849, 1852,
+ 1862, 1865, 1871, 1872, 1876, 1884, 1888, 1898, 1903, 1920,
+ 1920, 1925, 1925, 1932, 1932, 1940, 1943, 1949, 1952, 1958,
+ 1962, 1969, 1976, 1983, 1990, 2001, 2010, 2014, 2021, 2024,
+ 2030, 2030
};
#endif
diff --git a/src/compiler/intermediate.h b/src/compiler/intermediate.h
index 09454f6..2a3ad9c 100644
--- a/src/compiler/intermediate.h
+++ b/src/compiler/intermediate.h
@@ -183,7 +183,7 @@
EOpVectorTimesScalarAssign,
EOpMatrixTimesScalarAssign,
EOpMatrixTimesMatrixAssign,
- EOpDivAssign,
+ EOpDivAssign
};
extern const char* getOperatorString(TOperator op);
@@ -273,7 +273,7 @@
enum TLoopType {
ELoopFor,
ELoopWhile,
- ELoopDoWhile,
+ ELoopDoWhile
};
class TIntermLoop : public TIntermNode {
diff --git a/src/compiler/preprocessor/Diagnostics.cpp b/src/compiler/preprocessor/DiagnosticsBase.cpp
similarity index 98%
rename from src/compiler/preprocessor/Diagnostics.cpp
rename to src/compiler/preprocessor/DiagnosticsBase.cpp
index 3f50dfc..3e22e1f 100644
--- a/src/compiler/preprocessor/Diagnostics.cpp
+++ b/src/compiler/preprocessor/DiagnosticsBase.cpp
@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include <cassert>
diff --git a/src/compiler/preprocessor/Diagnostics.h b/src/compiler/preprocessor/DiagnosticsBase.h
similarity index 100%
rename from src/compiler/preprocessor/Diagnostics.h
rename to src/compiler/preprocessor/DiagnosticsBase.h
diff --git a/src/compiler/preprocessor/DirectiveHandler.cpp b/src/compiler/preprocessor/DirectiveHandlerBase.cpp
similarity index 88%
rename from src/compiler/preprocessor/DirectiveHandler.cpp
rename to src/compiler/preprocessor/DirectiveHandlerBase.cpp
index ca91e1c..ef35c6e 100644
--- a/src/compiler/preprocessor/DirectiveHandler.cpp
+++ b/src/compiler/preprocessor/DirectiveHandlerBase.cpp
@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
-#include "DirectiveHandler.h"
+#include "DirectiveHandlerBase.h"
namespace pp
{
diff --git a/src/compiler/preprocessor/DirectiveHandler.h b/src/compiler/preprocessor/DirectiveHandlerBase.h
similarity index 100%
rename from src/compiler/preprocessor/DirectiveHandler.h
rename to src/compiler/preprocessor/DirectiveHandlerBase.h
diff --git a/src/compiler/preprocessor/DirectiveParser.cpp b/src/compiler/preprocessor/DirectiveParser.cpp
index f2e42d0..94dfdf5 100644
--- a/src/compiler/preprocessor/DirectiveParser.cpp
+++ b/src/compiler/preprocessor/DirectiveParser.cpp
@@ -10,8 +10,8 @@
#include <cstdlib>
#include <sstream>
-#include "Diagnostics.h"
-#include "DirectiveHandler.h"
+#include "DiagnosticsBase.h"
+#include "DirectiveHandlerBase.h"
#include "ExpressionParser.h"
#include "MacroExpander.h"
#include "Token.h"
diff --git a/src/compiler/preprocessor/ExpressionParser.cpp b/src/compiler/preprocessor/ExpressionParser.cpp
index 228639f..dee6029 100644
--- a/src/compiler/preprocessor/ExpressionParser.cpp
+++ b/src/compiler/preprocessor/ExpressionParser.cpp
@@ -84,8 +84,11 @@
// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunknown-pragmas"
// Triggered by the auto-generated pplval variable.
#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#pragma GCC diagnostic warning "-Wunknown-pragmas"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065 4701)
#endif
@@ -95,7 +98,7 @@
#include <cassert>
#include <sstream>
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Lexer.h"
#include "Token.h"
@@ -105,6 +108,8 @@
#include <stdint.h>
typedef intmax_t YYSTYPE;
#endif // _MSC_VER
+#define YYENABLE_NLS 0
+#define YYLTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_DECLARED 1
@@ -467,9 +472,9 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 85, 85, 92, 93, 96, 99, 102, 105, 108,
- 111, 114, 117, 120, 123, 126, 129, 132, 135, 138,
- 151, 164, 167, 170, 173, 176, 179
+ 0, 90, 90, 97, 98, 101, 104, 107, 110, 113,
+ 116, 119, 122, 125, 128, 131, 134, 137, 140, 143,
+ 156, 169, 172, 175, 178, 181, 184
};
#endif
diff --git a/src/compiler/preprocessor/ExpressionParser.y b/src/compiler/preprocessor/ExpressionParser.y
index 832ad40..7a7f534 100644
--- a/src/compiler/preprocessor/ExpressionParser.y
+++ b/src/compiler/preprocessor/ExpressionParser.y
@@ -21,8 +21,11 @@
// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunknown-pragmas"
// Triggered by the auto-generated pplval variable.
#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#pragma GCC diagnostic warning "-Wunknown-pragmas"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065 4701)
#endif
@@ -32,7 +35,7 @@
#include <cassert>
#include <sstream>
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Lexer.h"
#include "Token.h"
@@ -42,6 +45,8 @@
#include <stdint.h>
typedef intmax_t YYSTYPE;
#endif // _MSC_VER
+#define YYENABLE_NLS 0
+#define YYLTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_DECLARED 1
diff --git a/src/compiler/preprocessor/MacroExpander.cpp b/src/compiler/preprocessor/MacroExpander.cpp
index 086cd78..1116c51 100644
--- a/src/compiler/preprocessor/MacroExpander.cpp
+++ b/src/compiler/preprocessor/MacroExpander.cpp
@@ -9,7 +9,7 @@
#include <algorithm>
#include <sstream>
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Token.h"
namespace pp
diff --git a/src/compiler/preprocessor/Preprocessor.cpp b/src/compiler/preprocessor/Preprocessor.cpp
index ffa7225..de024fe 100644
--- a/src/compiler/preprocessor/Preprocessor.cpp
+++ b/src/compiler/preprocessor/Preprocessor.cpp
@@ -9,7 +9,7 @@
#include <cassert>
#include <sstream>
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "DirectiveParser.h"
#include "Macro.h"
#include "MacroExpander.h"
diff --git a/src/compiler/preprocessor/Tokenizer.cpp b/src/compiler/preprocessor/Tokenizer.cpp
index eca9c3d..4a57647 100644
--- a/src/compiler/preprocessor/Tokenizer.cpp
+++ b/src/compiler/preprocessor/Tokenizer.cpp
@@ -56,6 +56,7 @@
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
+typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -179,6 +180,11 @@
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -201,11 +207,6 @@
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -223,7 +224,7 @@
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -302,7 +303,7 @@
YY_BUFFER_STATE pp_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *ppalloc (yy_size_t ,yyscan_t yyscanner );
void *pprealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -353,7 +354,7 @@
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (yy_size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
@@ -516,7 +517,7 @@
#include "Tokenizer.h"
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Token.h"
#if defined(__GNUC__)
@@ -575,8 +576,8 @@
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -633,7 +634,7 @@
void ppset_out (FILE * out_str ,yyscan_t yyscanner );
-int ppget_leng (yyscan_t yyscanner );
+yy_size_t ppget_leng (yyscan_t yyscanner );
char *ppget_text (yyscan_t yyscanner );
@@ -700,7 +701,7 @@
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1328,7 +1329,7 @@
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1342,7 +1343,7 @@
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1373,7 +1374,7 @@
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1498,7 +1499,7 @@
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1522,7 +1523,7 @@
case EOB_ACT_END_OF_FILE:
{
if ( ppwrap(yyscanner ) )
- return EOF;
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -1778,7 +1779,7 @@
*/
static void ppensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -1876,12 +1877,11 @@
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -1991,7 +1991,7 @@
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int ppget_leng (yyscan_t yyscanner)
+yy_size_t ppget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
diff --git a/src/compiler/preprocessor/Tokenizer.l b/src/compiler/preprocessor/Tokenizer.l
index 9762988..689ae64 100644
--- a/src/compiler/preprocessor/Tokenizer.l
+++ b/src/compiler/preprocessor/Tokenizer.l
@@ -25,7 +25,7 @@
%{
#include "Tokenizer.h"
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Token.h"
#if defined(__GNUC__)
diff --git a/src/compiler/preprocessor/preprocessor.vcxproj b/src/compiler/preprocessor/preprocessor.vcxproj
index b39b0e7..dccce7d 100644
--- a/src/compiler/preprocessor/preprocessor.vcxproj
+++ b/src/compiler/preprocessor/preprocessor.vcxproj
@@ -134,8 +134,8 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="Diagnostics.cpp" />
- <ClCompile Include="DirectiveHandler.cpp" />
+ <ClCompile Include="DiagnosticsBase.cpp" />
+ <ClCompile Include="DirectiveHandlerBase.cpp" />
<ClCompile Include="DirectiveParser.cpp" />
<ClCompile Include="ExpressionParser.cpp" />
<ClCompile Include="Input.cpp" />
@@ -148,8 +148,8 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="length_limits.h" />
- <ClInclude Include="Diagnostics.h" />
- <ClInclude Include="DirectiveHandler.h" />
+ <ClInclude Include="DiagnosticsBase.h" />
+ <ClInclude Include="DirectiveHandlerBase.h" />
<ClInclude Include="DirectiveParser.h" />
<ClInclude Include="ExpressionParser.h" />
<ClInclude Include="Input.h" />