CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Compiler error SCR=7660 [statement error ???]

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
thierry91



Joined: 24 Feb 2012
Posts: 2

View user's profile Send private message

Compiler error SCR=7660 [statement error ???]
PostPosted: Tue Mar 05, 2013 1:42 pm     Reply with quote

Hello,

Sad
Shocked


*** Error 44 "mor.c" Line 1866(1,1): Internal Error - Contact CCS LABEL SCR=7660


on Compiler 4.134 PCH,

Error IS HERE :


Arrow
Code:

#define COM_T1_SET_MAX_SPEED    0x54        //  'T'
#define COM_T2_SET_MAX_SPEED    0x55        //  'U'
-----------------------------------
  switch (code)
    {
      case ...:
       break;
...
...
      case COM_T1_SET_MAX_SPEED:
        //......
        if (cond) return;
        break;

      case COM_T2_SET_MAX_SPEED:
        //.....
        if (cond) return;
        break;

...
      case ...:
        break;

      default:
        ...
        break


it was as I've add a case status in a switch statement....
Is there limits in the number of statement that can handle the switch statement in the compiler ?

or an error into the parser that cannot handle so long labels ?
--> tried other lengths same error

or an error into the parser that cannot handle too similar labels ?
---> tried other chars : same error


or an error into the parser that cannot handle these values ?
---->
Quote:
tried 0x75 in replacement of 0x55 works, but NOT ACCEPTABLE


So, were can I find a list of all errors (SCR/number), if it exists ?

Thierry
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Tue Mar 05, 2013 2:59 pm     Reply with quote

Can you duplicate the error in a SMALL complete compilable program we can all test?

Mike
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Tue Mar 05, 2013 3:38 pm     Reply with quote

The usual reason for this type of behaviour is a syntax error possibly hundreds of lines earlier, that the compiler does not immediately flag, but then causes an inexplicable error later.
Other thing is something line having 'SET_MAX_SPEED' already defined earlier, which then gets expanded in the second definition....

Best Wishes
thierry91



Joined: 24 Feb 2012
Posts: 2

View user's profile Send private message

Compiler error SCR=7660 [statement error ???]
PostPosted: Wed Mar 06, 2013 6:22 am     Reply with quote

And no, there is no syntax error, since I just add only this part of code in a working project....,

case(s) are not duplicate,

#define(s) have no expand included

No, I cannot reproduce the error in a smaller code, but as I tried many and many ways to solve this problem,

I've found the solution, to bypass this compiler error.....

But why this error ?

Code:


     case COM_SET_MAX_SPEED_1:
        ->->->
        break;

      case COM_SET_MAX_SPEED_2:
        ->->
        break;


      case COM_SET_MAX_SPEED_FL:
        ->->->
        break;

      case COM_SET_MIN_POS_FL:
        ->->
        break;



to (solution !!!!!! )
Code:

     case COM_SET_MAX_SPEED_1:   ----------------
        ->->->                                                                   
        break;



      case COM_SET_MAX_SPEED_FL:
        ->->->
        break;

      case COM_SET_MIN_POS_FL:
        ->->
        break;


--------- MOVE the case statement,
************ I wish to have them in the same screen as reading the code, but it does not compile.......
Code:
       
      case COM_SET_MAX_SPEED_2: 
          ->->
        break;


now this code compile in my project, maybe an error in the way the compiler handle the labels....

Thierry
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Wed Mar 06, 2013 10:01 am     Reply with quote

Remember an expanded include, could include something in one of the compiler's own files.
Try the experiment of not adding the case, but instead adding a variable, and setting it equal to the defines. Then using a debugger or output of some sort, see what values it takes.

Best Wishes
jchristf



Joined: 26 Apr 2013
Posts: 1

View user's profile Send private message

PostPosted: Fri Apr 26, 2013 12:18 pm     Reply with quote

Try using #opt to reduce optimization
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group