Hi !

After succesfully compiling dehydra on cygwin, I wanted to port
dehydra to use C language instead of C++ and...

I've added gcc plugin initialization code into c-objc-common.c - for C+
+ front end the same initialization code is
inside cp\cp-lang.c.

Then about parameters which I wanted to pass to gcc plugin...

global_namespace like we discussed previously is working only in C++,
in C it should be NULL...

#ifdef GCC_CP_NAME_LOOKUP_H
    // C++ frontend only
    plugin_set_param(14,&global_namespace,0);
#else
    plugin_set_param(14,NULL,0);
#endif

But after that I've got following list of errors:

../../gcc-4.3.0/gcc/gcc_externals_setup.h:80: error:
`cp_walk_subtrees' undeclared (first use in this function)
../../gcc-4.3.0/gcc/gcc_externals_setup.h:80: error: (Each undeclared
identifier is reported only once
../../gcc-4.3.0/gcc/gcc_externals_setup.h:80: error: for each function
it appears in.)
../../gcc-4.3.0/gcc/gcc_externals_setup.h:94: error: `type_as_string'
undeclared (first use in this function)
../../gcc-4.3.0/gcc/gcc_externals_setup.h:95: error: `decl_as_string'
undeclared (first use in this function)
../../gcc-4.3.0/gcc/gcc_externals_setup.h:96: error: `expr_as_string'
undeclared (first use in this function)
../../gcc-4.3.0/gcc/gcc_externals_setup.h:97: error: `lang_decl_name'
undeclared (first use in this function)
../../gcc-4.3.0/gcc/gcc_externals_setup.h:98: error:
`class_key_or_enum_as_string' undeclared (first use in this function)


I've already checked some of those - for example
class_key_or_enum_as_string is relatively simple one - can can be
copied almost as is (e.g. 'class' does not exists in c - but it's
irrelevant probably).

cp_walk_subtrees probably came because previously I had tree checking
assertions enabled (now disabled). - can be dropped out for timebeing.

Other functions are more complex. For instance - 'expr_as_string'
equalent does not exists in C source codes.

Can someone provide me more information on what those functions do,
and how c++ / c remapping could be potentially handled ?

_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis

Reply via email to