Branch: Tag:

2018-08-20

2018-08-20 09:25:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Set the CPP_MACRO_KEEP_NL flag in appropriate places.

5242:    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);
5250:    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");    }   
5380:    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();    }