../.././gcc/gimple.h:67:54: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
gimple_check_failed (__gs, FILE, LINE, FUNCTION, \
^
../.././gcc/gimple.h:4280:3: note: in expansion of macro ‘GIMPLE_CHECK’
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
^
../.././gcc/gimple.h:68:17: warning: enum conversion when passing argument 6 of ‘gimple_check_failed’ is invalid in C++ -Wc++-compat, 0); \
^
../.././gcc/gimple.h:4280:3: note: in expansion of macro ‘GIMPLE_CHECK’
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
^
../.././gcc/gimple.h:59:13: note: expected ‘enum tree_code’ but argument is of type ‘int’
extern void gimple_check_failed (const_gimple, const char , int, \
^
../.././gcc/toplev.c: At top level:
../.././gcc/toplev.c:536:1: error: redefinition of ‘floor_log2’
floor_log2 (unsigned HOST_WIDE_INT x)
^
In file included from ../.././gcc/toplev.c:58:0:
../.././gcc/toplev.h:190:1: note: previous definition of ‘floor_log2’ was here
floor_log2 (unsigned HOST_WIDE_INT x)
^
../.././gcc/toplev.c:571:1: error: redefinition of ‘exact_log2’
exact_log2 (unsigned HOST_WIDE_INT x)
^
In file included from ../.././gcc/toplev.c:58:0:
../.././gcc/toplev.h:196:1: note: previous definition of ‘exact_log2’ was here
exact_log2 (unsigned HOST_WIDE_INT x)
^
../.././gcc/toplev.c: In function ‘print_to_asm_out_file’:
../.././gcc/toplev.c:1185:7: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf (asm_out_file, text);
^
../.././gcc/toplev.c: In function ‘print_to_stderr’:
../.././gcc/toplev.c:1214:7: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf (stderr, text);
^
Makefile:2470: recipe for target 'toplev.o' failed
make[3]: ** [toplev.o] Error 1
make[3]: Leaving directory '/home/zsj/下载/related/gcc-4.4.0/host-x86_64-unknown-linux-gnu/gcc'
Makefile:5144: recipe for target 'all-stage1-gcc' failed
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory '/home/zsj/下载/related/gcc-4.4.0'
Makefile:19883: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/home/zsj/下载/related/gcc-4.4.0'
Makefile:741: recipe for target 'all' failed
make: *** [all] Error 2
你Ubuntu16自带的GCC版本应该起码gcc5了吧,你再编译gcc4.4的源码可能有一些语法警告错误。
是的,自带gcc版本是gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2),因为我安装oracle数据库,好像因为gcc版本过高,导致监听程序起不来。所以要重新装低版本的GCC,然后就出现一系列的错误了,安装了相关的依赖包,还是不行~刚开始学习,很多不懂。
重复定义网上只有一种解决办法#ifndef...但我试着改了代码后没有效果,真恼人