JDK-6214406 : MS VC++ compiler warning at jni.h when using fastcall, enable optimization
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2005-01-05
  • Updated: 2019-01-15
  • Resolved: 2014-03-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Relates :  
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.
14-03-2014