saniljhaveri / avr-project-ide

Automatically exported from code.google.com/p/avr-project-ide
0 stars 0 forks source link

"undefined reference" linker errors not showing up in error list for virtual functions #74

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create the following .cpp file:

class Test {
public:
    virtual void baseFunc();
};

/* don't define baseFunc()
void Test::baseFunc() {
}
*/

class Test2 : public Test {
public:
    void test() {
        baseFunc();
    }
};

int main()
{
    Test2 t;
    t.test();
    return 0;
}

What is the expected output? What do you see instead?
  I would expect to see an error in the error list saying that "baseFunc" is not defined. I do not see this error in the error list but I do see it as output in the output text window.

Attached is a patch to include this error in the error list. This patch does 
have the side effect of including all "undefined reference" errors which come 
up quite often but are usually caused by another error. For example:

void main() {
  i++; // i not definied
}

will create 2 errors now. One for "i" not being defined and one for an 
undefined reference to main.

Original issue reported on code.google.com by joe.m.fe...@gmail.com on 28 Dec 2010 at 9:22

Attachments:

GoogleCodeExporter commented 8 years ago
patch added in 104

Original comment by frank.zhao.main@gmail.com on 12 Jan 2011 at 7:17