警告:ISO C++98不支持'z'gnu_printf长度修饰符

警告:ISO C++98不支持'z'gnu_printf长度修饰符

我是“ubuntu 社区”的新人,我刚刚和我的大学开始了一个项目,我需要安装一个工具链(OpenRisc GNU 工具链来自本教程:https://github.com/kdgwill/OR1K/wiki/OpenRisc-tools-Install),但我遇到了这个问题。

当我需要用制作命令 (构建 GCC - 第 1 阶段)该过程没有完成,并继续显示标题中报告的消息,引用了打印函数,or1k-gcc 目录中的许多文件中都存在该函数。它不会终止,只会继续运行并显示以下内容:

g++ -fno-PIE -c  -DIN_GCC_FRONTEND -g -O2 -DIN_GCC-DCROSS_DIRECTORY_STRUCTURE
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
-fno-common  -DHAVE_CONFIG_H -I. -Ic-family -I../../or1k-gcc/gcc -I../../or1k-gcc/gcc/c-family 
-I../../or1k-gcc/gcc/../include -I../../or1k-gcc/gcc/../libcpp/include  -I../../or1k-gcc/gcc/../libdecnumber -I../../or1k-gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../or1k-gcc/gcc/../libbacktrace   -o c-family/c-dump.o -MT 
c-family/c-dump.o -MMD -MP -MF c-family/.deps/c-dump.TPo ../../or1k-gcc/gcc/c-family/c-dump.c
In file included from ../../or1k-gcc/gcc/hash-table.h:561:0,
                 from ../../or1k-gcc/gcc/coretypes.h:440,
                 from ../../or1k-gcc/gcc/c-family/c-dump.c:23:
../../or1k-gcc/gcc/mem-stats.h: In member function ‘void mem_usage::dump(mem_location*, mem_usage&) const’:
../../or1k-gcc/gcc/mem-stats.h:213:72: warning: ISO C++98 does not support the ‘z’ gnu_printf length modifier [-Wformat=]
       get_percent (m_times, total.m_times), loc->m_ggc ? "ggc" : "heap");
                                                                        ^
../../or1k-gcc/gcc/mem-stats.h:213:72: warning: ISO C++98 does not support the ‘z’ gnu_printf length modifier [-Wformat=]
../../or1k-gcc/gcc/mem-stats.h:213:72: warning: ISO C++98 does not support the ‘z’ gnu_printf length modifier [-Wformat=]
../../or1k-gcc/gcc/mem-stats.h: In member function ‘void mem_usage::dump_footer() const’:
../../or1k-gcc/gcc/mem-stats.h:224:55: warning: ISO C++98 does not support the ‘z’ gnu_printf length modifier [-Wformat=]
       SIZE_AMOUNT (m_allocated), SIZE_AMOUNT (m_times));
                                                       ^
../../or1k-gcc/gcc/mem-stats.h:224:55: warning: ISO C++98 does not support the ‘z’ gnu_printf length modifier [-Wformat=]

根据论坛或教程,我尝试更新 gcc 编译器,正如有人所说这里但什么都没有改变。

感谢所有试图帮助我的人:)

相关内容