summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-05-24 11:48:44 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-05-24 11:48:44 +0100
commit39b9c7564aa7e5751adbbeaf1715cacd6f80a443 (patch)
tree440f719180524a7d443fbdfa7be1042d84e49cdd
parent35fc3f5130197ca1b32d7aa900fe5ac98fe95a21 (diff)
eolian: add support for warning when pointer type is found (with env var)
-rw-r--r--src/lib/eolian/eo_parser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 6e3d895e26..5f83683111 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -847,6 +847,11 @@ parse_ptr:
847 if (ls->t.token == '*') 847 if (ls->t.token == '*')
848 eo_lexer_syntax_error(ls, "pointer to complex/class type"); 848 eo_lexer_syntax_error(ls, "pointer to complex/class type");
849 } 849 }
850 if (getenv("EOLIAN_WARN_PTR") && ls->t.token == '*')
851 {
852 fprintf(stderr, "eolian:%s:%d:%d: found pointer type\n",
853 def->base.file, line, col);
854 }
850 while (ls->t.token == '*') 855 while (ls->t.token == '*')
851 { 856 {
852 Eolian_Type *pdef; 857 Eolian_Type *pdef;