Branch: Tag:

2016-11-05

2016-11-05 15:58:01 by Tobias S. Josefowitz <tobij@tobij.de>

Compiler: Warn when using . for indexing dynamically.

Also introduce #pragma (no_)dynamic_dot which squelshes the warning.

1633:       if (!is_const(n)) {    /* Index dynamically. */ +  if (Pike_compiler->compiler_pass == 2 && !(THIS_COMPILATION->lex.pragmas +  & ID_DYNAMIC_DOT)) +  { +  yywarning("Using . to index dynamically."); +  }    return mknode(F_INDEX, copy_node(n), mkstrnode(id));    }