Mike Stump <mikest...@comcast.net> writes: > On Apr 5, 2011, at 1:56 AM, Rainer Orth wrote: >> * lto.c (promote_var): Only set VISIBILITY_HIDDEN if >> HAVE_GAS_HIDDEN. > > Oh, at a minimum, if TARGET_ASM_ASSEMBLE_VISIBILITY is set, doing this stuff > I think is useful?
No, this won't work. E.g. on Solaris with an assembler without visibility support, TARGET_ASM_ASSEMBLE_VISIBILITY is set, but just emits a warning. This is similiar to default_assemble_visibility with HAVE_GAS_HIDDEN undefined. Right now, there are four definitions of TARGET_ASM_ASSEMBLE_VISIBILITY: * i386/cygming.h: i386_pe_assemble_visibility only warns about visibility attributes, so no problem here. * darwin.h: darwin_assemble_visibility is the only implementation which can handle VISIBILITY_HIDDEN (only), but doesn't define HAVE_GAS_HIDDEN. Maybe it should, but one would have to check every instance of the macro to make sure there are no ill effects. * rs6000/rs6000.c: protected by HAVE_GAS_HIDDEN. * sol2.h: warns unless HAVE_GAS_HIDDEN. What a mess. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University