RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

Erik Joelsson erik.joelsson at oracle.com
Mon Apr 8 19:20:12 UTC 2019


On 2019-04-08 11:40, Kim Barrett wrote:
>> On Apr 8, 2019, at 10:28 AM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
>>
>> Hello,
>>
>> On 2019-04-05 15:46, Kim Barrett wrote:
>>> Assuming all that, consider instead putting this_file_helper in
>>> exceptions.hpp (perhaps with a better name?), don't bother with
>>> THIS_FILE, and define THREAD_AND_LOCATION as
>>>
>>> #define THREAD_AND_LOCATION THREAD, this_file_helper(__FILE__), __LINE__
>>>
>> Moved to exceptions.hpp, renamed to "basename", and removed the THIS_FILE macro.
> “basename” might not count as a “better name”, as it conflicts with a POSIX function,
> even though we don’t presently seem to be using that anywhere that I could find.
>
>
How about "simple_basename" then? Or just prefix with an underscore? The 
idea is to keep it internal to the headerfile, but I'm not familiar with 
conventions in Hotspot to know how you usually prefix/namespace things 
as private.

/Erik



More information about the build-dev mailing list