diff options
author | Carl Worth <cworth@cworth.org> | 2010-05-24 11:27:23 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-05-24 11:27:23 -0700 |
commit | 35419095f8d92f7dc5de472da3a0271d343cbcba (patch) | |
tree | 9915f984e31aafe0d85a73b1b2d2891842f0d175 | |
parent | 89b933a24375a2ebed383290f24360a14edbac6b (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).
-rw-r--r-- | glcpp-parse.y | 4 | ||||
-rw-r--r-- | glcpp.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/glcpp-parse.y b/glcpp-parse.y index 0d3afa7af6..2c0fe9a6af 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 @@ -24,6 +24,8 @@ #ifndef GLCPP_H #define GLCPP_H +#include <stdint.h> + #include <talloc.h> #include "hash_table.h" |