Beispiel #1
0
static void
init_cp_pragma (void)
{
  c_register_pragma (0, "vtable", handle_pragma_vtable);
  c_register_pragma (0, "unit", handle_pragma_unit);
  c_register_pragma (0, "interface", handle_pragma_interface);
  c_register_pragma (0, "implementation", handle_pragma_implementation);
  c_register_pragma ("GCC", "interface", handle_pragma_interface);
  c_register_pragma ("GCC", "implementation", handle_pragma_implementation);
  c_register_pragma ("GCC", "java_exceptions", handle_pragma_java_exceptions);
}
Beispiel #2
0
// we're registering our pragmas
void plugin_pragma( void *gcc_data, void *user_data ) //t_myproof*
{
    (void)gcc_data;
    const int n_pragmas = sizeof(pragmas) / sizeof(*pragmas);
    int i;

    g_myproof_pragma = user_data;
    warning(0, "Loop to register pragmas");

    for (i = 0; i < n_pragmas; ++i)
	{
	    c_register_pragma(MYPROOF_PRAGMA_SPACE, pragmas[i].name, pragmas[i].handler);
	}
}