diff mbox

{patch cp]: Disable hidden-inlines for pe-coff targets

Message ID CAEwic4bgvaKrDUnqsks5Z9tK6D3Vsn2CL81ruc0CVg2xXZSO_g@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Aug. 4, 2014, 11:03 a.m. UTC
Hi,

This patch makes sure that visibility-option for hidden-inlines
doesn't show any effect for pe-coff as for those targets no concept of
hidden-visiblitly isn't present.

ChangeLog

2014-08-04  Kai Tietz  <ktietz@redhat.com>

    * decl2.c (determine_hidden_inline): Always fail for PE-COFF as
    there is no hidden visibility available.

Tested for x86_64-w64-mingw32, i686-w64-mingw32, and i686-pc-cygwin.
Ok for apply?

Regards,
Kai

Comments

Jason Merrill Aug. 4, 2014, 7:39 p.m. UTC | #1
On 08/04/2014 07:03 AM, Kai Tietz wrote:
>      * decl2.c (determine_hidden_inline): Always fail for PE-COFF as
>      there is no hidden visibility available.

I'd think we should give a warning about -fvisibility-inlines-hidden on 
windows and turn off the flag rather than silently ignore it here.

Jason
diff mbox

Patch

Index: decl2.c
===================================================================
--- decl2.c     (Revision 213543)
+++ decl2.c     (Arbeitskopie)
@@ -2447,6 +2447,9 @@ 
 determine_hidden_inline (tree decl)
 {
   return (visibility_options.inlines_hidden
+#ifdef TARGET_PECOFF
+         && !TARGET_PECOFF
+#endif
          /* Don't do this for inline templates; specializations might not be
             inline, and we don't want them to inherit the hidden
             visibility.  We'll set it here for all inline instantiations.  */