compile error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

compile error

跳至解决方案
3,155 次查看
Chaos
Contributor I
can someone please help. I get " ERROR: C2450: Expected: ~ ( INDENT auto const extern register static typedef volatile _interrupt"
 
I do not have a clue what this means.
I include the source
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,833 次查看
CompilerGuru
NXP Employee
NXP Employee
Count the opening and closing braces, the code is closing one more than it opens.


Code:
/*      572 */  void test_SPI ( void )
/*      573 */  {
/*      574 */    BYTE j , wr , rd ;
/*      576 */    wreg ( 17 << 3 , 0x10 ) ;
/*      577 */    wreg ( 15 << 3 , 0x20 ) ;
/*      578 */    wreg ( 15 << 3 , 0 ) ;
/*      579 */    wr = 0x01 ;
/*      580 */    for ( j = 0 ; j < 8 ; j ++ )
/*      581 */    {
/*      582 */      wreg ( 14 << 3 , wr ) ;
/*      583 */      rd = rreg ( 14 << 3 ) ;
/*      584 */      wr <<= 1 ;
/*      585 */    }
/*      586 */  }
/*      592 */  for ( ; ; ) { }
/*      594 */  }
 

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,833 次查看
CrasyCat
Specialist III
Hello
 
I suspect some macros are not defined/expanded correctly.
 
Please create a pre-processor listing and check the proprocessing file around the line where the error is reported.
 
To generate the pre-processor listing:
  Click right on the C source file in the .mcp window and select preprocess in the context menu
 
CrasyCat
0 项奖励
回复
1,833 次查看
Chaos
Contributor I
thanks Crasycat
 
I did the preprocess but can't see anything suspicious. the error point to line 592 in the KDet.c file. its the second last line of the preprocess file tha t i have zipped here.
Would you please be so kind to see if you can find something.
 
thanx
0 项奖励
回复
1,834 次查看
CompilerGuru
NXP Employee
NXP Employee
Count the opening and closing braces, the code is closing one more than it opens.


Code:
/*      572 */  void test_SPI ( void )
/*      573 */  {
/*      574 */    BYTE j , wr , rd ;
/*      576 */    wreg ( 17 << 3 , 0x10 ) ;
/*      577 */    wreg ( 15 << 3 , 0x20 ) ;
/*      578 */    wreg ( 15 << 3 , 0 ) ;
/*      579 */    wr = 0x01 ;
/*      580 */    for ( j = 0 ; j < 8 ; j ++ )
/*      581 */    {
/*      582 */      wreg ( 14 << 3 , wr ) ;
/*      583 */      rd = rreg ( 14 << 3 ) ;
/*      584 */      wr <<= 1 ;
/*      585 */    }
/*      586 */  }
/*      592 */  for ( ; ; ) { }
/*      594 */  }
 
0 项奖励
回复
1,833 次查看
Chaos
Contributor I
Thanks Buddy
 
One tends to overlook the basic things and look for bigger complicated faults
0 项奖励
回复