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).
This commit is contained in:
Carl Worth
2010-05-24 11:27:23 -07:00
parent 89b933a243
commit 35419095f8
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -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
+2
View File
@@ -24,6 +24,8 @@
#ifndef GLCPP_H
#define GLCPP_H
#include <stdint.h>
#include <talloc.h>
#include "hash_table.h"