eolian: add support for warning when pointer type is found (with env var)
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Tue, 24 May 2016 10:48:44 +0000 (11:48 +0100)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Tue, 24 May 2016 10:48:44 +0000 (11:48 +0100)
src/lib/eolian/eo_parser.c

index 6e3d895..5f83683 100644 (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;