Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 146817 | Differences between
and this patch

Collapse All | Expand All

(-)gcc/c-pragma.c (-21 / +2 lines)
Lines 635-662 Link Here
635
            GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored");
635
            GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored");
636
          token = c_lex (&x);
636
          token = c_lex (&x);
637
          if (token != CPP_NAME)
637
          if (token != CPP_NAME)
638
            {
638
            GCC_BAD ("malformed #pragma GCC visibility push");
639
              GCC_BAD ("malformed #pragma GCC visibility push");
640
            }
641
          else
639
          else
642
            {
640
            push_visibility (IDENTIFIER_POINTER (x));
643
              const char *str = IDENTIFIER_POINTER (x);
644
	      VEC_safe_push (visibility, heap, visstack,
645
			     default_visibility);
646
              if (!strcmp (str, "default"))
647
                default_visibility = VISIBILITY_DEFAULT;
648
              else if (!strcmp (str, "internal"))
649
                default_visibility = VISIBILITY_INTERNAL;
650
              else if (!strcmp (str, "hidden"))
651
                default_visibility = VISIBILITY_HIDDEN;  
652
              else if (!strcmp (str, "protected"))
653
                default_visibility = VISIBILITY_PROTECTED;
654
              else
655
                {
656
                  GCC_BAD ("#pragma GCC visibility push() must specify default, internal, hidden or protected");
657
                }
658
              visibility_options.inpragma = 1;
659
            }
660
          if (c_lex (&x) != CPP_CLOSE_PAREN)
641
          if (c_lex (&x) != CPP_CLOSE_PAREN)
661
            GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored");
642
            GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored");
662
        }
643
        }

Return to bug 146817