171 e->cval =
c->eval->cval;
179 error_loc(
"multi-character constants are endian dependent\n");
198 error_loc(
"invalid storage class for type expression\n");
222 unsigned int cast_mask;
227 cast_mask = (1
u << (cast_type_bits - 1)) - 1;
228 if (
expr->cval & (1
u << (cast_type_bits - 1)))
229 e->cval = -((-
expr->cval) & cast_mask);
231 e->cval =
expr->cval & cast_mask;
236 cast_mask = ((1
u << (cast_type_bits - 1)) - 1) |
237 1
u << (cast_type_bits - 1);
238 e->cval =
expr->cval & cast_mask;
244 e->cval =
expr->cval;
266 e->cval = !
expr->cval;
269 e->cval = +
expr->cval;
272 e->cval = -
expr->cval;
275 e->cval = ~
expr->cval;
306 if (expr2->
cval == 0)
308 error_loc(
"divide by zero in expression\n");
318 if (expr2->
cval == 0)
320 error_loc(
"divide by zero in expression\n");
440 *found_in_cont_type = 0;
478 *found_in_cont_type = 1;
485 if (const_var)
type = const_var->
type;
540 int found_in_cont_type;
692 int toplevel,
const char *toplevel_prefix,
693 const type_t *cont_type,
const char *local_var_prefix)
715 if (
toplevel && toplevel_prefix && cont_type)
717 int found_in_cont_type;
719 if (found_in_cont_type)
721 fprintf(
h,
"%s%s", toplevel_prefix,
e->u.sval);
725 fprintf(
h,
"%s%s", local_var_prefix,
e->u.sval);
828 write_expr(
h,
e->u.ext, 1, 0, toplevel_prefix, cont_type,
"");
844 write_expr(
h,
e->u.ext, 1, 1, toplevel_prefix, cont_type, local_var_prefix);
871 if (
a->type !=
b->type)
872 return a->type -
b->type;
879 return a->u.lval -
b->u.lval;
881 return a->u.dval -
b->u.dval;
886 return strcmp(
a->u.sval,
b->u.sval);
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
static int compare_type(const type_t *a, const type_t *b)
expr_t * make_expr2(enum expr_type type, expr_t *expr1, expr_t *expr2)
static var_list_t * type_struct_get_fields(const type_t *type)
static int is_valid_member_operand(const type_t *type)
static type_t * type_array_get_element(const type_t *type)
struct _loc_info_t loc_info
static int is_signed_integer_type(const type_t *type)
static var_list_t * type_union_get_cases(const type_t *type)
static enum type_basic_type type_basic_get_type(const type_t *type)
var_t * find_const(const char *name, int f)
expr_t * make_expr3(enum expr_type type, expr_t *expr1, expr_t *expr2, expr_t *expr3)
int compare_expr(const expr_t *a, const expr_t *b)
GLfloat GLfloat GLfloat GLfloat h
static int is_float_type(const type_t *type)
static type_t * type_pointer_get_ref(const type_t *type)
type_t * type_new_int(enum type_basic_type basic_type, int sign)
expr_t * make_exprd(enum expr_type type, double val)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
static var_list_t * type_function_get_args(const type_t *type)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
static int is_integer_type(const type_t *type)
expr_t * make_exprl(enum expr_type type, int val)
static type_t * find_identifier(const char *identifier, const type_t *cont_type, int *found_in_cont_type)
expr_t * make_exprs(enum expr_type type, char *val)
GLboolean GLboolean GLboolean b
static enum type_type type_get_type(const type_t *type)
static void check_arithmetic_type(const struct expr_loc *expr_loc, const type_t *cont_type, const type_t *type)
static struct expression_type resolve_expression(const struct expr_loc *expr_loc, const type_t *cont_type, const expr_t *e)
expr_t * make_exprt(enum expr_type type, var_t *var, expr_t *expr)
type_t * type_new_pointer(unsigned char pointer_default, type_t *ref, attr_list_t *attrs)
expr_t * make_expr(enum expr_type type)
static void check_integer_type(const struct expr_loc *expr_loc, const type_t *cont_type, const type_t *type)
void write_expr(FILE *h, const expr_t *e, int brackets, int toplevel, const char *toplevel_prefix, const type_t *cont_type, const char *local_var_prefix)
expr_t * make_expr1(enum expr_type type, expr_t *expr)
type_t * type_new_basic(enum type_basic_type basic_type)
const type_t * expr_resolve_type(const struct expr_loc *expr_loc, const type_t *cont_type, const expr_t *expr)
static void check_scalar_type(const struct expr_loc *expr_loc, const type_t *cont_type, const type_t *type)
static unsigned int type_memsize(ITypeInfo *typeinfo, TYPEDESC *desc)
static int type_basic_get_sign(const type_t *type)
static int type_array_is_decl_as_ptr(const type_t *type)
int strcmp(const char *String1, const char *String2)
GLuint GLuint GLsizei GLenum type
GLboolean GLboolean GLboolean GLboolean a