warning:C4201 pragma inline was not handled

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

warning:C4201 pragma inline was not handled

ソリューションへジャンプ
1,790件の閲覧回数
russellsher
Contributor III

I am using mcs908QE128 (on a demoqe board)

If I have:

#pragma inline

// Read the content of a memory address

char flash_read(unsigned int address)

{

  unsigned char *pointer;

  pointer = (char*) address;

  return (*pointer);

}

 

I get the warning above warning ( warning:C4201 pragma inline was not handled)

Does inlining not work for this device (or compiler)

thanks

Russell

 

ラベル(1)
0 件の賞賛
返信
1 解決策
1,351件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

Pragma's names are case sensitive, inline and INLINE is not the same. And in the answer above, I meant to mention that there is a pragma INLINE, I noticed I typed INTERRUPT instead.

Use (I did not try this out)

#pragma INLINE

// Read the content of a memory address

char flash_read(unsigned int address)

{

  const char *pointer;

  pointer = (const char*) address;

  return (*pointer);

}

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,351件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

That's exactly  what it means, the compiler does not recognize the inline pragma.

Note that the S08 compiler does know the pragma INTERRUPT (all uppercase).

Check the compiler manual for the s08 for a list of supported pragmas, it has a chapter "Compiler Pragmas".

Daniel

0 件の賞賛
返信
1,351件の閲覧回数
admin
Specialist II

Hi Daniel, I looked at the V10.x HC(S)08 Build Tools Reference Manual manual - it does list #pragma INLINE on page 360.

Is there another associated reason for the earning?

0 件の賞賛
返信
1,352件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

Pragma's names are case sensitive, inline and INLINE is not the same. And in the answer above, I meant to mention that there is a pragma INLINE, I noticed I typed INTERRUPT instead.

Use (I did not try this out)

#pragma INLINE

// Read the content of a memory address

char flash_read(unsigned int address)

{

  const char *pointer;

  pointer = (const char*) address;

  return (*pointer);

}

0 件の賞賛
返信
1,351件の閲覧回数
admin
Specialist II

Hi - thanks for that, I guess I didn't look too closely at the case

0 件の賞賛
返信
1,351件の閲覧回数
admin
Specialist II

many thanks for the reply - will check it out

0 件の賞賛
返信