compile error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,162件の閲覧回数
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,840件の閲覧回数
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,840件の閲覧回数
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,840件の閲覧回数
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,841件の閲覧回数
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,840件の閲覧回数
Chaos
Contributor I
Thanks Buddy
 
One tends to overlook the basic things and look for bigger complicated faults
0 件の賞賛
返信