Skip to content

Can't construct int32_t vector with 0xFFFFFFFF #165275

@Nemi26

Description

@Nemi26
#include <stdint.h>

using ivec3 = int32_t __attribute__((ext_vector_type(3)));

void ok() {

    const int32_t x = 0xFFFFFFFF; // ok
    const ivec3 mask1 = { 0, 0xFFFFFFFF, 0 }; // error!!!

    const ivec3 mask2 = { 0, x, 0 }; // ok
}

https://godbolt.org/z/z165s9GMG

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