===================================================================
@@ -75,26 +75,6 @@ typedef enum pragma_omp_clause {
#define HANDLE_PRAGMA_PACK 1
#endif /* HANDLE_PRAGMA_PACK_PUSH_POP */
-/* It's safe to always leave visibility pragma enabled as if
- visibility is not supported on the host OS platform the
- statements are ignored. */
-#define HANDLE_PRAGMA_VISIBILITY 1
extern void push_visibility (const char *, int);
extern bool pop_visibility (int);
===================================================================
@@ -616,8 +632,11 @@ maybe_apply_renaming_pragma (tree decl,
return 0;
}
+
+/* It's safe to always leave visibility pragma enabled as if
+ visibility is not supported on the host OS platform the
+ statements are ignored. */
-#ifdef HANDLE_PRAGMA_VISIBILITY
static void handle_pragma_visibility (cpp_reader *);
static VEC (int, heap) *visstack;
@@ -710,8 +729,7 @@ handle_pragma_visibility (cpp_reader *du
warning (OPT_Wpragmas, "junk at end of %<#pragma GCC visibility%>");
}
-#endif
-
+
static void
handle_pragma_diagnostic(cpp_reader *ARG_UNUSED(dummy))
{
@@ -1329,10 +1347,8 @@ init_pragma (void)
#ifdef HANDLE_PRAGMA_WEAK
c_register_pragma (0, "weak", handle_pragma_weak);
#endif
-#ifdef HANDLE_PRAGMA_VISIBILITY
- c_register_pragma ("GCC", "visibility", handle_pragma_visibility);
-#endif
+ c_register_pragma ("GCC", "visibility", handle_pragma_visibility);
c_register_pragma ("GCC", "diagnostic", handle_pragma_diagnostic);
c_register_pragma ("GCC", "target", handle_pragma_target);
c_register_pragma ("GCC", "optimize", handle_pragma_optimize);
===================================================================
@@ -13776,10 +13776,8 @@ cp_parser_namespace_definition (cp_parse
/* Parse the body of the namespace. */
cp_parser_namespace_body (parser);
-#ifdef HANDLE_PRAGMA_VISIBILITY
if (has_visibility)
pop_visibility (1);
-#endif
/* Finish the namespace. */
pop_namespace ();
===================================================================
@@ -3239,7 +3239,6 @@ handle_namespace_attrs (tree ns, tree at
tree name = TREE_PURPOSE (d);
tree args = TREE_VALUE (d);
-#ifdef HANDLE_PRAGMA_VISIBILITY
if (is_attribute_p ("visibility", name))
{
tree x = args ? TREE_VALUE (args) : NULL_TREE;
@@ -3260,7 +3259,6 @@ handle_namespace_attrs (tree ns, tree at
saw_vis = true;
}
else
-#endif
{
warning (OPT_Wattributes, "%qD attribute directive ignored",
name);