warning: "__STDC_VERSION__" is not defined

900 views
Skip to first unread message

Carlos A. M. dos Santos

unread,
Feb 6, 2011, 11:53:33 PM2/6/11
to andro...@googlegroups.com
Hello,

The sys/cdefs.h include file contains the following two tests:

#if __STDC_VERSION__ >= 199901L

#if !(__STDC_VERSION__ >= 199901L)

As far as I could tell __STDC_VERSION__ is defined by the C compiler
only if the "-std=c99" argument is provided and is never defined by
the C++ compiler, regardless what the -std= argument is. So if I use
the "-Wundef" argument, I get two annoying warnings for each compiled
file. At the moment I'm appeasing the compiler by passing
"-D__STDC_VERSION__=0" in the command line, but it would be nice if
the tests in cdefs.h were replaced by

#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L

#if defined(__STDC_VERSION__) && !(__STDC_VERSION__ >= 199901L)

Should I submit a bug report?

İsmail Dönmez

unread,
Feb 9, 2011, 4:57:19 AM2/9/11
to andro...@googlegroups.com
Hi;

This is also a problem while compiling WebKit codebase and your fix looks correct. So please open a bugreport at b.android.com .

Thanks,
ismail


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


Carlos A. M. dos Santos

unread,
Feb 9, 2011, 7:44:24 AM2/9/11
to andro...@googlegroups.com
On Wed, Feb 9, 2011 at 7:57 AM, İsmail Dönmez <ism...@namtrac.org> wrote:
> Hi;
> This is also a problem while compiling WebKit codebase and your fix looks
> correct. So please open a bugreport at b.android.com .
> Thanks,
> ismail

Done: http://code.google.com/p/android/issues/detail?id=14627

Reply all
Reply to author
Forward
0 new messages