identifier name clash between hotspot and glibc
omajid at redhat.com
Thu Oct 20 08:36:57 PDT 2011
I recently ran into a build failure when building hotspot with a recent
In file included from
error: "__LEAF" redefined [-Werror]
/usr/include/sys/cdefs.h:43:0: note: this is the location of the
cc1plus: all warnings being treated as errors
(Complete build logs are available at )
As you can guess, glibc has added a macro __LEAF to
/usr/include/sys/cdefs.h, which conflicts with the definition of the
macro in hotspot .
ISO/IEC 9899:TC3 Section 7.1.3 ("Reserved Identifiers") says:
All identifiers that begin with an underscore and either an uppercase
letter or another underscore are always reserved for any use
From this, it sounds like hotspot should not be using these
identifiers. A search for '#define __' shows about 81 matches , but
only __LEAF is causing a problem right now.
Does anyone have any thoughts on how I should go about fixing it? Does
renaming __LEAF to something like VM_LEAF or even LEAF__ make sense?
More information about the hotspot-dev