# "\_\_inline" is undefined, "int32\_t" has already been declared

**URL:** <https://forums.freertos.org/t/inline-is-undefined-int32-t-has-already-been-declared/12036>\
**Category:** Libraries\
**Created:** [March 19, 2021, 8:00am UTC](https://forums.freertos.org/t/inline-is-undefined-int32-t-has-already-been-declared/12036 "2021-03-19T08:00:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eduardo-semcon](https://avatars.discourse-cdn.com/v4/letter/e/85e7bf/32.png) [@eduardo-semcon](https://forums.freertos.org/u/eduardo-semcon)\
**Post date:** [March 19, 2021, 8:00am UTC](https://forums.freertos.org/t/inline-is-undefined-int32-t-has-already-been-declared/12036/1 "2021-03-19T08:00:43Z")

</div>

When compiling BufferAllocation2.c

I get several errors:

BufferAllocation\_2.c  
Error[Pe020]: identifier “\_\_inline” is undefined C:\dev\bootloader\Bootloader\FreeRTOSv202012.00\FreeRTOS-IP\include\FreeRTOS\_IP.h 203  
Error[Pe101]: “int32\_t” has already been declared in the current scope (at line 29 of “C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.1\arm\inc\c\stdint.h”) C:\dev\bootloader\Bootloader\FreeRTOSv202012.00\FreeRTOS-IP\include\FreeRTOS\_IP.h 203  
Error[Pe065]: expected a “;” C:\dev\bootloader\Bootloader\FreeRTOSv202012.00\FreeRTOS-IP\include\FreeRTOS\_IP.h 203  
Error[Pe020]: identifier “\_\_inline” is undefined C:\dev\bootloader\Bootloader\FreeRTOSv202012.00\FreeRTOS-IP\include\FreeRTOS\_IP.h 205

THe errors seem to originate in FreeRTOS\_IP.h:  
#if ( ipconfigHAS\_INLINE\_FUNCTIONS == 1 )

```
    static portINLINE int32_t FreeRTOS_max_int32( int32_t a,
                                                  int32_t b );
    static portINLINE uint32_t FreeRTOS_max_uint32( uint32_t a,

```

This happens with other files.

Any ideas?

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [March 19, 2021, 8:08am UTC](https://forums.freertos.org/t/inline-is-undefined-int32-t-has-already-been-declared/12036/2 "2021-03-19T08:08:13Z")

</div>

In your project `portINLINE` is defined as `__inline`, which is the default. Could it be that IAR wants a different name for this prefix, maybe just “inline”?

> Error[Pe101]: “int32\_t” has already been declared

I would expect that type being defined in stdint.h, and I assume that this header file can be included multiple times?  
Where else is it defined for a second time?

---

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [March 19, 2021, 8:18am UTC](https://forums.freertos.org/t/inline-is-undefined-int32-t-has-already-been-declared/12036/3 "2021-03-19T08:18:54Z")

</div>

I also think it’s just `inline` for IAR. Maybe the `int32_t` issue is just a follow up problem und disappears after fixing `portINLINE`.

---

<div class="post-metadata">

**Author:** ![eduardo-semcon](https://avatars.discourse-cdn.com/v4/letter/e/85e7bf/32.png) [@eduardo-semcon](https://forums.freertos.org/u/eduardo-semcon)\
**Post date:** [March 19, 2021, 9:18am UTC](https://forums.freertos.org/t/inline-is-undefined-int32-t-has-already-been-declared/12036/4 "2021-03-19T09:18:44Z")

</div>

I just changed \_\_line to inline as it is just shown on the next line and it compiled fine.  
I still have some other errors but I think the inline and int32 errors have gone.  
It seems that portmacro.h needs to be corrected for IAR…  
I took this file from:  
FreeRTOSv202012.00\FreeRTOS\portable\IAR\r0p1  
so it should be the right one.

```
#define portNOP()

**#define portINLINE inline //__inline**

#ifndef portFORCE_INLINE
    #define portFORCE_INLINE **inline** __attribute__ ( ( always_inline ) )
#endif
```
