summaryrefslogtreecommitdiff
path: root/glcpp-parse.y
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-24 11:27:23 -0700
committerCarl Worth <cworth@cworth.org>2010-05-24 11:27:23 -0700
commit35419095f8d92f7dc5de472da3a0271d343cbcba (patch)
tree9915f984e31aafe0d85a73b1b2d2891842f0d175 /glcpp-parse.y
parent89b933a24375a2ebed383290f24360a14edbac6b (diff)
Switch to intmax_t (rather than int) for #if expressions
This is what the C99 specification demands. And the GLSL specification says that we should follow the "standard C++" rules for #if condition expressions rather than the GLSL rules, (which only support a 32-bit integer).
Diffstat (limited to 'glcpp-parse.y')
-rw-r--r--glcpp-parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/glcpp-parse.y b/glcpp-parse.y
index 0d3afa7..2c0fe9a 100644
--- a/glcpp-parse.y
+++ b/glcpp-parse.y
@@ -107,6 +107,7 @@ glcpp_parser_lex (glcpp_parser_t *parser);
%}
%union {
+ intmax_t imaxval;
int ival;
char *str;
argument_list_t *argument_list;
@@ -119,7 +120,8 @@ glcpp_parser_lex (glcpp_parser_t *parser);
%lex-param {glcpp_parser_t *parser}
%token DEFINE DEFINED ELIF ELSE ENDIF FUNC_MACRO IDENTIFIER IDENTIFIER_FINALIZED IF IFDEF IFNDEF INTEGER OBJ_MACRO NEWLINE SPACE TOKEN UNDEF
-%type <ival> expression INTEGER punctuator
+%type <ival> punctuator
+%type <imaxval> expression INTEGER
%type <str> content FUNC_MACRO IDENTIFIER IDENTIFIER_FINALIZED OBJ_MACRO
%type <argument_list> argument_list
%type <string_list> macro parameter_list