'for' loop initial declaration used outside C99 mode

64 views
Skip to first unread message

Macarse

unread,
May 8, 2012, 6:36:18 PM5/8/12
to itoa-dev
Hello,

When building my app I get :

'for' loop initial declaration used outside C99 mode

So I have added to my ItoaModule.mk:

MODULE_CFLAGS := \
-std=gnu99

And now I am getting this warning:

itoa/ndk/platform/arch-arm/usr/include/ctype.h:103: warning: C99
inline functions are not supported; using GNU89
itoa/itoa/ndk/platform/arch-arm/usr/include/ctype.h:103: warning: to
disable this warning use -fgnu89-inline or the gnu_inline function
attribute

I am about to disable the warning adding -fgnu89-inline to the flags.
Is that safe?

Thanks!

Dmitry Skiba

unread,
May 10, 2012, 4:47:05 AM5/10/12
to itoa...@googlegroups.com
Hi Carlos,

Yes, gnu99 is needed for new C features. As for inlines - that thing is greatly complicated in C. I also use "-fgnu89-inline" for building CleanCF (itoa-cleancf/ItoaModule.mk), and I didn't encounter any issues.

Dmitry

2012/5/9 Macarse <mac...@gmail.com>

Macarse

unread,
May 10, 2012, 8:14:00 AM5/10/12
to itoa...@googlegroups.com

Great!
Thanks

Reply all
Reply to author
Forward
0 new messages