Skip to content

[c++] error: address of vector element requested #83996

@vfdff

Description

@vfdff
void testVectorComponentAccess() {
  typedef float v4sf __attribute__ ((vector_size (16)));
  static v4sf q;
  float* r = &q[0]; // expected-error {{address of vector element requested}}
}

For above small case, the gcc accepts, while llvm report a error, so is it a GCC extension ?
the above case is spilted from expr-address-of.c

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"questionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions