gnu-attributes.c 623 B

123456789101112131415161718
  1. // RUN: %clang_cc1 -fsyntax-only -verify %s
  2. // expected-no-diagnostics
  3. struct s {};
  4. // FIXME: should warn that declaration attribute in type position is
  5. // being applied to the declaration instead?
  6. struct s __attribute__((used)) foo;
  7. // FIXME: Should warn that type attribute in declaration position is
  8. // being applied to the type instead?
  9. struct s *bar __attribute__((address_space(1)));
  10. // Should not warn because type attribute is in type position.
  11. struct s *__attribute__((address_space(1))) baz;
  12. // Should not warn because declaration attribute is in declaration position.
  13. struct s *quux __attribute__((used));