JDK-8347719 : [REDO] Portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-01-14
  • Updated: 2025-05-08
  • Resolved: 2025-04-24
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.
JDK 25
25 b21Fixed
Related Reports
Causes :  
Cloners :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8347720 :  
Description
Currently, FORBID_C_FUNCTION only works for gcc like compilers, and ALLOW_C_FUNCTION acts to disable CRT warnings on Windows, where FORBID_C_FUNCTION does not work. It would be beneficial to provide a universal portable definition for both, to reduce maintenance cost and to allow the macros to work on all platforms HotSpot can be compiled for
Comments
Changeset: d3f31b0d Branch: master Author: Kim Barrett <kbarrett@openjdk.org> Date: 2025-04-24 11:43:53 +0000 URL: https://git.openjdk.org/jdk/commit/d3f31b0d8e9c90f3dc8e97a299c9e0b7f5b05284
24-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24608 Date: 2025-04-12 13:48:21 +0000
12-04-2025

Redoing this using the same `[[deprecated]]` attribute approach as in the original (JDK-8313396) will run into JDK-8347649. That may be a clang bug rather than an inherent issue with the deprecation approach.
18-03-2025