-
27 votesanswersviews
GCC在初始化程序周围缺少括号
我在C中有这个结构,我想初始化为零 . 如何摆脱缺失的括号警告? typedef struct { uint32_t incoming[FRAME_TYPE_MAX]; uint32_t outgoing[FRAME_TYPE_MAX]; uint32_t timeouts; uint32_t crc_errors; } pkt_t; static pkt_t s... -
31 votesanswersviews
为什么gcc会长时间发出警告?
-Wlong-long gcc警告的原因是什么? 从gcc手册页: -Wlong-long Warn if long long type is used. This is enabled by either -Wpedantic or -Wtraditional in ISO C90 and C++98 modes. To inhibit the warning message... -
1 votesanswersviews
C99代码在Linux上编译,Windows上的语法错误
我在C99中有一个代码库,可以在Linux上使用GCC和Clang完美地编译和运行;但是,在MinGW-w64(通过MSYS2安装)上,它会出现错误 include/math3d.h: In function 'matPerspective': include/math3d.h:577:1: error: parameter name omitted matPerspective (float y... -
6 votesanswersviews
初始化时真的需要花括号吗?
根据GCC 4.6.3(Ubuntu / Linaro 4.6.3-1ubuntu5),我在以下代码中的数组初始化中缺少大括号: #include <iostream> #include <boost/array.hpp> #include <array> int main(){ int plain[] = {1,2... -
1 votesanswersviews
隐式声明警告:内置函数是什么?
问题界面正在标记许多"Questions that may already have your answer",但我试图尽职尽责地检查是否有人问我到底在哪里 . 如果这是重复,我道歉 . 假设我有以下不正确的程序: extern void undefined_function(void); int main(int argc, char **argv) { undefi... -
1 votesanswersviews
解除引用类型惩罚指针将破坏严格别名规则:字节数组到一个数字
我已经阅读了很多关于这个警告的问题(Dereferencing type-punned pointer will break strict-aliasing rules,Dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing],What is the strict aliasing ... -
0 votesanswersviews
警告!解除引用类型惩罚指针将破坏严格别名规则[-Wstrict-aliasing]
我有别名问题 . 我以前从未接触过它 . 我正在使用Eclipse CDT . 我读了不同的解决方案,但我找不到合适的解决方案 . 我有警告 解除引用类型惩罚指针将破坏严格别名规则[-Wstrict-aliasing] 所以我有以下代码和平: timestamp = st0 % 100000000; for (std::list<struct trace *>::iterator... -
4 votesanswersviews
TensorFlow不会使用调试模式构建
我们正在尝试使用debug标志构建TensorFlow测试用例: bazel build -c dbg // tensorflow / python / kernel_tests:sparse_matmul_op_test 但是,构建失败并出现以下错误: /usr/include/features.h:330:4:错误:#warning _FORTIFY_SOURCE需要使用优化进行编译(-...