mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00

Fixes https://github.com/dlang/dmd/issues/20499 Fixes https://github.com/dlang/dmd/issues/20963 ImportC deferred declaring "tagged" types (structs/unions/enums) until after it saw a possible typedef so that the identifier for a typedef declaration like: typedef struct { int x; } Foo; would give the struct the name Foo. In several circumstances, this led to tagged types not being declared. Resolve this by chasing down those circumstances. Also, there were other circumstances where types weren't being correctly declared which caused other issues. Lock those down.
15 lines
312 B
C
15 lines
312 B
C
// check importAll analysis of C files
|
|
/* TEST_OUTPUT:
|
|
---
|
|
fail_compilation/failcstuff3.c(54): Error: redeclaration of `S22061`
|
|
---
|
|
*/
|
|
|
|
/***************************************************/
|
|
// https://issues.dlang.org/show_bug.cgi?id=22061
|
|
#line 50
|
|
struct S22061
|
|
{
|
|
int field;
|
|
};
|
|
typedef union S22061 S22061;
|