pike.git / src / cpp.cmod

version» Context lines:

pike.git/src/cpp.cmod:5235:    *!    *! Adds some cpp macros defined by the ANSI-C standards,    *! such as @[__FILE__], @[__LINE__], etc.    *!    *! @seealso    *! @[define_macro()], @[define_pike_macros()]    */    PIKEFUN void define_ansi_macros()    {    struct CPP_struct *this = THIS; +  struct define_struct *def;       /* These attempt to be compatible with the C standard. */    do_magic_define(this,"__LINE__",insert_current_line);    do_magic_define(this,"__FILE__",insert_current_file_as_string);    do_magic_define(this,"__DATE__",insert_current_date_as_string);    do_magic_define(this,"__TIME__",insert_current_time_as_string);       /* These are from the 201x C standard. */ -  do_magic_define(this,"_Pragma",insert_pragma)->args = 1; +  def = do_magic_define(this, "_Pragma", insert_pragma); +  def->args = 1; +  def->flags |= CPP_MACRO_KEEP_NL; +     simple_add_define(this, "static_assert", "_Static_assert");    }       /*! @decl void define_pike_macros()    *!    *! Adds some pike-specific cpp macros,    *! such as @[__DIR__], @[__VERSION__], [__PIKE__], etc.    *!    *! @seealso    *! @[define_macro()], @[define_ansi_macros()]
pike.git/src/cpp.cmod:5373:    pop_stack();    def->magic = insert_callback_define;    def->flags |= CPP_MACRO_VARARGS;    def->args = 1;    }    else    {    def = alloc_empty_define(s);    def->magic = insert_callback_define_no_args;    } +  def->flags |= CPP_MACRO_KEEP_NL; +     mapping_string_insert(this->defines, def->name, Pike_sp-1);    pop_stack();    }    else if ((TYPEOF(k->val) == T_INT) && !k->val.u.integer) {    add_define (this, s, empty_pike_string);    } else {    Pike_error("Expected zero, string or function value for "    "predefine %O.\n",    &k->ind);    }