View unanswered posts | View active topics It is currently Thu Oct 30, 2014 7:27 pm






Reply to topic  [ 3 posts ] 
RobotC 3.51 bug 9 
Author Message
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post RobotC 3.51 bug 9
Got a warning when compiling the following code. The code gave me the correct answer though.
*Warning*:Substituting 'opcdAssign' opcode for 'opcdAssignRamVariablePtr'
Code:
typedef struct
{
    int n1;
    int n2;
} OBJ1;

typedef struct
{
    OBJ1 *obj1;
    int n3;
} OBJ2;

OBJ1 g_obj1;
OBJ2 g_obj2;

void InitObj1(OBJ1 &obj1)
{
    obj1.n1 = 1;
    obj1.n2 = 2;
}

void InitObj2(OBJ2 &obj2, OBJ1 &obj1, int n)
{
    obj2.obj1 = &obj1;
    obj2.n3 = n;
}

void Func1(OBJ1 &obj1)
{
    nxtDisplayTextLine(0, "obj1.n1=%d", obj1.n1);
    nxtDisplayTextLine(1, "obj1.n2=%d", obj1.n2);
}

void Func2(OBJ2 &obj2)
{
    Func1(*obj2.obj1);
    nxtDisplayTextLine(2, "obj2.n3=%d", obj2.n3);
}

task main()
{
    InitObj1(g_obj1);
    InitObj2(g_obj2, g_obj1, 3);

    Func2(g_obj2);
}


Thu Sep 27, 2012 4:47 am
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 615
Post Re: RobotC 3.51 bug 9
This warning message has been removed. It was primarily a benign message created during compiler development to validate that optimized code was being created. The update was to go back to calling routine and add the additional 3-line check to create optimized code.


Tue Oct 02, 2012 2:25 am
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 615
Post Re: RobotC 3.51 bug 9
This warning message has been removed. It was primarily a benign message created during compiler development to validate that optimized code was being created. The update was to go back to calling routine and add the additional 3-line check to create optimized code.


Tue Oct 02, 2012 2:25 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.