eolian: add support for warning when pointer type is found (with env var)

This commit is contained in:
Daniel Kolesa 2016-05-24 11:48:44 +01:00
parent 35fc3f5130
commit 39b9c7564a
1 changed files with 5 additions and 0 deletions

View File

@ -847,6 +847,11 @@ parse_ptr:
if (ls->t.token == '*')
eo_lexer_syntax_error(ls, "pointer to complex/class type");
}
if (getenv("EOLIAN_WARN_PTR") && ls->t.token == '*')
{
fprintf(stderr, "eolian:%s:%d:%d: found pointer type\n",
def->base.file, line, col);
}
while (ls->t.token == '*')
{
Eolian_Type *pdef;