This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

error: symbol .. redeclared with incompatible type: with -pm option

I get  error: symbol  ..  redeclared with incompatible type: with -pm option. Without -pm option it is ok.

My CGT is 7.4.4  and CCS  is ver5.5.0.00077

 

error: symbol "Nalu_Mng2::Nalu_Mng2()" redeclared with incompatible type:
   "struct Nalu_Mng2 *(struct Nalu_Mng2 *)"
   in
   "C:/TOP_DIR/work/project/ccs_projects/../include/nalu_mng
   2.h" at line 32 and:
   "struct Nalu_Mng2 *(struct Nalu_Mng2 *)"
   in "../src/nalu_mng2.cpp" at line 15)

 

in nalu_mng2.cpp at  line 15  is

Nalu_Mng2:: Nalu_Mng2()
{}

 

and nalu_mng.h  at line 32  is

class Nalu_Mng2
{
 public:
   Nalu_Mng2();
   ~Nalu_Mng2();

.......

 

Pls help me to resolve this.

Best Regards

JK

 

 

 

  • Try upgrading to compiler version 7.4.7; it contains a fix related to type compatibility checking.  If that doesn't help, we will most likely need a test case in order to analyze the problem.  Due to the nature of -pm, this might require many files.

  • Hi

    Updated CGT to 7.4.7.  But the same error appears again.

    I made a simple test case with one src and header file. Could not reproduce the error in it.

    I think more files are needed to check this. Anyways I wanted to know how much gain in terms of cycles , I can get if I use  -pm option?

    Best Regards

    JK

  • Jayakrishnan said:
    I wanted to know how much gain in terms of cycles , I can get if I use  -pm option?

    I cannot guarantee you will see a big win.  It's possible.  It is also possible you will only see a small improvement.  

    Thanks and regards,

    -George

  • I'm having the same problem.  I was able to revert and track down what exactly causes it.  It seems to have something to do with nested struct/union statements.

    struct ABC {
        struct {
            int A;
        };
    };
    struct ABC map;// need to instantiate a variable of this type to provoke the error.


    Adding the above code triggers the error, which is a complaint about a formerly declared nested struct that is shared across the project. The error
    does not appear if the nested struct is named (as below)

    struct ABC {
    struct A {
    int A;
    } A;
    }

  • Let me correct the formatting....

    I'm having the same problem.  I was able to revert and track down what exactly causes it.  It seems to have something to do with nested struct/union statements.

    struct ABC {
    	union {
    		int A;
    	};
    };
    
    struct ABC map;// need to instantiate a variable of this type to provoke the error.
    

    Adding the above code triggers the error, which is a complaint about a formerly declared nested struct that is shared across the project. The error does not appear if the nested struct is named (as below)

    struct ABC { 
    	union A {     
    		int A; 
    	} A;
    }

  • This is SDSCM00052257.  It is fixed in C6000 compiler version 7.4.16

    See
    e2e.ti.com/.../1615502

  • I'm on a MSP430.

    The same issue is allegedly solved in v4.4.6 this month, will check it out. Thanks!