Make it compile as C++ code too

This commit is contained in:
Dale Weiler 2013-04-23 22:50:47 +00:00
parent c86e778c76
commit 10738da2fb
3 changed files with 3 additions and 3 deletions

View file

@ -312,7 +312,7 @@ static GMQCC_INLINE void ftepp_update_output_condition(ftepp_t *ftepp)
static GMQCC_INLINE ppmacro* ftepp_macro_find(ftepp_t *ftepp, const char *name)
{
return util_htget(ftepp->macros, name);
return (ppmacro*)util_htget(ftepp->macros, name);
}
static GMQCC_INLINE void ftepp_macro_delete(ftepp_t *ftepp, const char *name)

View file

@ -404,7 +404,7 @@ ast_expression *intrin_func(parser_t *parser, const char *name) {
if ((find = (void*)parser_find_global(parser, name)) && ((ast_value*)find)->expression.vtype == TYPE_FUNCTION)
for (i = 0; i < vec_size(parser->functions); ++i)
if (((ast_value*)find)->name && !strcmp(parser->functions[i]->name, ((ast_value*)find)->name) && parser->functions[i]->builtin < 0)
return find;
return (ast_expression*)find;
if ((find = util_htget(intrin_intrinsics(), name))) {
/* intrinsic is in table. This will "generate the function" so

View file

@ -257,7 +257,7 @@ static ast_value* parser_const_string(parser_t *parser, const char *str, bool do
{
size_t hash = util_hthash(parser->ht_imm_string, str);
ast_value *out;
if ( (out = util_htgeth(parser->ht_imm_string, str, hash)) ) {
if ( (out = (ast_value*)util_htgeth(parser->ht_imm_string, str, hash)) ) {
if (dotranslate && out->name[0] == '#') {
char name[32];
snprintf(name, sizeof(name), "dotranslate_%lu", (unsigned long)(parser->translated++));