-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Description
Describe the bug
Various mixings of [[attr]]
-style and __attribute__((attr))
attributes, and the alignas(n)
specifier, should be accepted by the parser, but are rejected (highlighted with yellow underline and "syntax error" alert).
To Reproduce
int v1 alignas(16); // should be ok but rejected
alignas(16) int v2; // (ok)
int v3 [[maybe_unused]] __attribute__((section(".foo"))) [[maybe_unused]] __attribute__((section(".foo"))); // (ok)
[[maybe_unused]] __attribute__((section(".foo"))) int v5; // (ok)
__attribute__((section(".foo"))) [[maybe_unused]] int v5; // (ok)
[[maybe_unused]] __attribute__((section(".foo")))
[[maybe_unused]] __attribute__((section(".foo"))) int v4; // should be ok but rejected
alignas(16) __attribute__((section(".foo"))) [[maybe_unused]] int v5; // should be ok but rejected
alignas(16) [[maybe_unused]] __attribute__((section(".foo"))) int v6; // (ok)
Expected behavior
All lines above should be accepted by the parser
Version Information (please complete the following information):
- OS: Linux
- Eclipse Version: 2025-06 (4.36)
- CDT Version: 12.1.0.202506041907
Metadata
Metadata
Assignees
Labels
No labels