This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: function attribute syntax question
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: gcc at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: Thu, 24 Jun 2004 13:45:12 +0530
- Subject: Re: function attribute syntax question
- References: <40DA0451.9010004@bothner.com>
Per Bothner wrote:
> libjava/jni.cc contains function definitions like the following:
>
> static jint
> (JNICALL _Jv_JNI_GetVersion) (JNIEnv *)
> {
> return JNI_VERSION_1_4;
> }
>
> which on MingGW expands to:
>
> static int
> (__attribute__((__stdcall__)) _Jv_JNI_GetVersion) (void)
> {
> return 0x00010004;
> }
>
> The attribute seems to be ignored, leading to
> lots of pedwarns. My question is: *is* this syntax supposed
> to be recognized? I.e. is this a C++ parser regression?
I had added those extra parentheses to jni.cc because
of this bug (see especially point #4, in the report):
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8656
(which has been resolved now).
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/