Skip to content

Should typeof_unqual remove [[gnu::aligned]] attribute on typedef's? #128

@fuhsnn

Description

@fuhsnn

https://godbolt.org/z/a1zjYMrY5

[[gnu::aligned]] typedef int T1;
[[gnu::aligned]] typedef int const T2;
[[gnu::aligned]] typedef int volatile T3;

__typeof_unqual(T1) i1; // 16-bytes aligned
__typeof_unqual(T2) i2; // 4-bytes aligned
__typeof_unqual(T3) i3; // 4-bytes aligned

Both GCC and Clang exhibit this inconsistency.
If the attribute is a qualifier it shouldn't survive typeof_unqual in i1, and if it isn't i2/i3 shouldn't drop it.

llvm/llvm-project#175733

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions