warning:C4201 pragma inline was not handled

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

warning:C4201 pragma inline was not handled

Jump to solution
1,430 Views
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

 

Labels (1)
0 Kudos
1 Solution
991 Views
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);

}

View solution in original post

0 Kudos
5 Replies
991 Views
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 Kudos
991 Views
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 Kudos
992 Views
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 Kudos
991 Views
admin
Specialist II

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

0 Kudos
991 Views
admin
Specialist II

many thanks for the reply - will check it out

0 Kudos