Bug 20469 - gcjh does not rename Java variables named NULL
Summary: gcjh does not rename Java variables named NULL
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.4.3
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-14 16:56 UTC by Sandro Santilli
Modified: 2016-10-03 17:39 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-06-13 00:44:47


Attachments
Simple reproducer (84 bytes, text/x-java)
2016-10-03 17:39 UTC, Andrew John Hughes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sandro Santilli 2005-03-14 16:56:09 UTC
headers generated by gcjh contains class members (didn't check about other
kind of objects) named 'NULL'. This is the name used in Java sourcecode, but
cannot be safely used in C++ headers as NULL is always (or often?) defined.

g++ error raised when including the produced headers is:

error: expected unqualified-id before numeric constant
Comment 1 Andrew Pinski 2005-06-13 00:44:47 UTC
Confirmed.
Comment 2 Andrew Pinski 2016-09-30 22:50:28 UTC
Closing as won't fix as the Java front-end has been removed from the trunk.
Comment 3 Andrew John Hughes 2016-10-03 17:39:46 UTC
Created attachment 39740 [details]
Simple reproducer