This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Miss head file diagnostic.h in plugin.h?
>> the include order should generally start
>>
>> #include "config.h"
>> #include "system.h"
>> #include "coretypes.h"
I've run into similar problems trying to port Dehydra to 4.6 (it works with 4.5)
Here's the basic header structure which builds only because I'm
commenting out a bunch of headers. Once I put them back in I get
errors similar to Mingjie's.
#include <config.h>
#include <system.h>
#include <coretypes.h>
#include <plugin.h>
#include <tm.h>
#include <tree.h>
//#include <cp/cp-tree.h>
#include <tree-iterator.h>
#include <pointer-set.h>
#include <toplev.h>
#include <diagnostic.h>
//#include <cp/cxx-pretty-print.h>
//#include <basic-block.h>
//#include <tree-flow.h>
None of these commented headers will build either together or in
combination. Here are the errors for each one:
#include <cp/cp-tree.h> :
In file included from
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:27,
from plugin_test.c:7:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/function.h:29:26:
error: hard-reg-set.h: No such file or directory
In file included from
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:27,
from plugin_test.c:7:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/function.h:446:
error: expected specifier-qualifier-list before âHARD_REG_SETâ
In file included from plugin_test.c:7:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:43:31:
error: c-family/c-common.h: No such file or directory
In file included from plugin_test.c:7:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:218:
error: field âc_commonâ has incomplete type
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:947:
error: field âx_stmt_treeâ has incomplete type
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:1016:
error: field âbaseâ has incomplete type
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:5481:
error: expected declaration specifiers or â...â before âref_operatorâ
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:5483:
error: expected declaration specifiers or â...â before âref_operatorâ
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:5563:
warning: âenum lvalue_useâ declared inside parameter list
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cp-tree.h:5563:
warning: its scope is only this definition or declaration, which is
probably not what you want
#include <cp/cxx-pretty-print.h> :
In file included from plugin_test.c:12:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cxx-pretty-print.h:24:37:
error: c-family/c-pretty-print.h: No such file or directory
In file included from plugin_test.c:12:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cxx-pretty-print.h:32:
error: âpp_c_flag_last_bitâ undeclared here (not in a function)
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/cp/cxx-pretty-print.h:38:
error: expected specifier-qualifier-list before âc_pretty_printerâ
#include <basic-block.h> :
In file included from
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/basic-block.h:26,
from plugin_test.c:13:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/function.h:29:26:
error: hard-reg-set.h: No such file or directory
In file included from
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/basic-block.h:26,
from plugin_test.c:13:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/function.h:446:
error: expected specifier-qualifier-list before âHARD_REG_SETâ
#include <tree-flow.h> (I guess the problem here is basic-block.h):
In file included from
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/basic-block.h:26,
from
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/tree-flow.h:27,
from plugin_test.c:14:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/function.h:29:26:
error: hard-reg-set.h: No such file or directory
In file included from
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/basic-block.h:26,
from
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/tree-flow.h:27,
from plugin_test.c:14:
/home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/function.h:446:
error: expected specifier-qualifier-list before âHARD_REG_SETâ
I've tried messing with the include order without any luck. Possible regression?
Ehren