United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6214406 : MS VC++ compiler warning at jni.h when using fastcall, enable optimization

Details
Type:
Bug
Submit Date:
2005-01-05
Status:
Closed
Updated Date:
2014-03-14
Project Name:
JDK
Resolved Date:
2014-03-14
Component:
hotspot
OS:
windows_2000
Sub-Component:
runtime
CPU:
x86
Priority:
P4
Resolution:
Not an Issue
Affected Versions:
1.4.2
Fixed Versions:
tbd_major

Related Reports
Relates:
Relates:

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
doesn;t matter just windows

EXTRA RELEVANT SYSTEM CONFIGURATION :
doesn;t matter just windows

A DESCRIPTION OF THE PROBLEM :
Miscrosoft Visual C++ 6.0  SP4 warns (with a good reason):

C:\j2sdk1.4.2_04\include\jni.h(836) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(865) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(883) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(900) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(917) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(934) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(951) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(968) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(985) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1002) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1019) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1035) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1056) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1077) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1098) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1119) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1140) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1161) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1182) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1205) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1228) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1320) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1338) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1356) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1374) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1392) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1410) : warning C4096: '__cdecl' must be used with '...'C:\j2sdk1.4.2_04\include\jni.h(1428) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1446) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1464) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1481) : warning C4096: '__cdecl' must be used with '...'

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
compile any *.cpp file while include in jni.h using #include preprocessor directive set calling convention to fastcall, enable optimization.
this way it is clear that jni.h cannot be mixed with projects using using mixed calling conventions inside it's structure.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compiler will generate the errors described in  Description
ACTUAL -
C:\j2sdk1.4.2_04\include\jni.h(836) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(865) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(883) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(900) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(917) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(934) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(951) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(968) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(985) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1002) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1019) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1035) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1056) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1077) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1098) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1119) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1140) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1161) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1182) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1205) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1228) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1320) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1338) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1356) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1374) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1392) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1410) : warning C4096: '__cdecl' must be used with '...'C:\j2sdk1.4.2_04\include\jni.h(1428) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1446) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1464) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1481) : warning C4096: '__cdecl' must be used with '...'

ERROR MESSAGES/STACK TRACES THAT OCCUR :
C:\j2sdk1.4.2_04\include\jni.h(836) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(865) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(883) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(900) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(917) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(934) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(951) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(968) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(985) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1002) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1019) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1035) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1056) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1077) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1098) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1119) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1140) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1161) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1182) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1205) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1228) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1320) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1338) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1356) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1374) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1392) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1410) : warning C4096: '__cdecl' must be used with '...'C:\j2sdk1.4.2_04\include\jni.h(1428) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1446) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1464) : warning C4096: '__cdecl' must be used with '...'
C:\j2sdk1.4.2_04\include\jni.h(1481) : warning C4096: '__cdecl' must be used with '...'

REPRODUCIBILITY :
This bug can be reproduced always.
###@###.### 2005-1-05 21:25:35 GMT

                                    

Comments
We don't think this is an issue anymore, JNICALL is already in jni.h on all exports.
                                     
2014-03-14



Hardware and Software, Engineered to Work Together