下面的代码演示了一个令人讨厌的问题:

class A {
public:
    A():
        m_b(1),
        m_a(2)
        {}
private:
    int m_a;
    int m_b;
};

这是控制台 View 上的输出:
make all
Building file: ../test.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"test.d" -MT"test.d" -o"test.o" "../test.cpp"
../test.cpp: In constructor 'A::A()':
../test.cpp:9: warning: 'A::m_b' will be initialized after
../test.cpp:8: warning:   'int A::m_a'
../test.cpp:3: warning:   when initialized here
Finished building: ../test.cpp

问题在于,在“问题” View 中,我将看到3个单独的警告(输出中包含警告词的行),而实际上输出中有4行描述一个问题。

有什么我想念的吗?

附加问题。也许是本着Eclipse的精神,但是有一种方法可以使控制台 View 像大多数IDE一样可单击(例如Visual Studio,emacs ...)

谢谢
迪玛

最佳答案

根据对this错误报告的最新评论,您应该能够在控制台 View 上单击以跳转到CDT 7.0中的代码。

可能值得检查里程碑版本,以查看错误消息的分组是否更好。如果不引发错误,尝试对相关消息进行分组将是一个好主意。

08-06 00:12
查看更多