stdbool.h header with the GNU/ARM C for Kinetis L

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

stdbool.h header with the GNU/ARM C for Kinetis L

1,224件の閲覧回数
steve_fae
Senior Contributor I

can stdbool.h header be used with the GNU/ARM C?

0 件の賞賛
5 返答(返信)

792件の閲覧回数
JimDon
Senior Contributor III

That's really not the best answer. I think what should happen is that you should use lib_c99.prefix instead of lib_ewl.prefix but  right now I don't know how do that, nor am I 100% sure of other side effects.

I just discovered http://cache.freescale.com/files/soft_dev_tools/doc/ref_manual/EWL_C_Reference.pdf but right now I don't have time to read it....see page 163

of this document.

"The facilities in this header file are only available when the compiler is configured to

compile source code for C99 (ISO/IEC 9899:1999). Refer to the Build Tools Reference for

information on compiling C99 source code." (ed. Really? Why?)

My thoughts:

(a slow sigh*) I don't see the big deal over defining bool, true and false. For some reason, the "C" gods have  made a deal out of this. If this is really the only issue, then you could advise that the user just do this - define bool true and false.

* to let out one's breath audibly, as from sorrow, weariness, or relief.

0 件の賞賛

792件の閲覧回数
JimDon
Senior Contributor III

Yes.

0 件の賞賛

792件の閲覧回数
steve_fae
Senior Contributor I

Ah, I didn't add, customer asked because they get this warning.

_EWL_C99 macro is not defined

0 件の賞賛

791件の閲覧回数
JimDon
Senior Contributor III

Add this at the top of the file:

#undef _EWL_C99

#define _EWL_C99 1

The warning will be gone.

792件の閲覧回数
JimDon
Senior Contributor III

Or put it in derivative.h