Skip to content

Commit 5c0c2c0

Browse files
committed
Add a test for what the composite type is.
1 parent 405ca1d commit 5c0c2c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/test/C/C23/n3037.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,4 +429,9 @@ void gh149965(void) {
429429
// FIXME: this should be an error in both C17 and C23 mode.
430430
struct GH149965_3 { int h; }; // c17-note {{previous definition is here}}
431431
struct GH149965_3 { enum E1 h; }; // c17-error {{redefinition of 'GH149965_3'}}
432+
433+
// For Clang, the composite type after declaration merging is the enumeration
434+
// type rather than an integer type.
435+
enum E1 *eptr;
436+
[[maybe_unused]] __typeof__(x1.h) *ptr = eptr;
432437
}

0 commit comments

Comments
 (0)