Branch: Tag:

2004-07-01

2004-07-01 20:53:02 by Martin Nilsson <mani@lysator.liu.se>

Don't bug out when if constant fails.

Rev: lib/master.pike.in:1.351
Rev: src/cpp.c:1.137
Rev: src/cpp.h:1.10

6:   // Pike is distributed under GPL, LGPL and MPL. See the file COPYING   // for more information.   // - // $Id: master.pike.in,v 1.350 2004/06/17 16:01:40 mast Exp $ + // $Id: master.pike.in,v 1.351 2004/07/01 20:53:02 nilsson Exp $      #pike __REAL_VERSION__   //#pragma strict_types
81:   //!   int compat_minor=-1;    + //! + int show_if_constant_errors = 0;      // --- Functions begin here.   
341:   program compile_string(string source, void|string filename,    object|void handler,    void|program p, -  void|object o) +  void|object o, +  void|int _show_if_constant_errors)   {    return compile(cpp(source, filename||"-", 1, handler, -  compat_major, compat_minor), +  compat_major, compat_minor, +  (zero_type(_show_if_constant_errors)? +  show_if_constant_errors: +  _show_if_constant_errors)),    handler,    compat_major,    compat_minor,
2368:    ({"ignore", MAY_HAVE_ARG, ({"-Dqdatplr"}), 0, 1}),    ({"ignore", HAS_ARG, ({"-s"}), 0, 0}),    ({"run_tool", NO_ARG, ({"-x"}), 0, 0}), +  ({"show_cpp_warn", NO_ARG, ({"--show-all-cpp-warnings"}), 0, 0}),    }), 1);       /* Parse -M and -I backwards */
2466:    case "run_tool":    run_tool = 1;    break; +  +  case "show_cpp_warn": +  show_if_constant_errors = 1; +  break;    }    }