cancel
Showing results for 
Search instead for 
Did you mean: 

Typedef bool C99 conflict in STM32F10x StdPeriph Lib V3.x.x

Clifford1
Associate III
Posted on April 20, 2010 at 12:32

Typedef bool C99 conflict in STM32F10x StdPeriph Lib V3.x.x

2 REPLIES 2
Andrew Neil
Evangelist
Posted on May 17, 2011 at 13:48

To be general, the solution would also have to cater for non-C99 compilers (which, I think, is the majority of embedded compilers?)

Clifford1
Associate III
Posted on May 17, 2011 at 13:48

All of GCC, Keil/ARM, and IAR support C99 at least in so far as having <stdbool.h> and <stdint.h> headers, and these are the compilers directly supported by ST's peripheral and CMSIS libraries. 

Moreover the library already uses <stdint.h> which is a C99 header also. 

At least a subset of C99 is supported by most compilers, and provision of these headers requires no modification to the compiler (although the stdbool.h would not have an intrinsic underlying _Bool type).  For example, I use a third-party implementation of these for VC++ 2008 for compatibility which does not otherwise provide them).

Even if I were not using a C99 compiler, the unnecessary incompatibility would be better avoided.

My real question is how best to report the issue to ST so that it may be improved?  I realise that I can fix it myself, but adding modifications to the library makes it cumbersome and error prone integrating future updates.