Bug 22060 – importC: Multiple forward declarations result in error struct conflicts with struct

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-21T16:25:49Z
Last change time
2021-06-21T19:34:02Z
Keywords
ImportC, pull, rejects-valid
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-06-21T16:25:49Z
Reduced test case: --- struct _IO_FILE; struct _IO_FILE; From preprocessed headers of stdio.h: --- struct _IO_FILE; typedef struct _IO_FILE __FILE; struct _IO_FILE; typedef struct _IO_FILE FILE; struct _IO_FILE; struct _IO_FILE { int _flags; char *_IO_read_ptr; char *_IO_read_end; char *_IO_read_base; char *_IO_write_base; char *_IO_write_ptr; char *_IO_write_end; char *_IO_buf_base; char *_IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; __off64_t _offset; struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; };
Comment #1 by dlang-bot — 2021-06-21T17:30:56Z
@ibuclaw created dlang/dmd pull request #12723 "fix Issue 21932, 22060 - importC: Multiple forward declarations result in error struct conflicts with struct" fixing this issue: - fix Issue 22060 - importC: Multiple forward declarations result in error struct conflicts with struct https://github.com/dlang/dmd/pull/12723
Comment #2 by dlang-bot — 2021-06-21T19:34:02Z
dlang/dmd pull request #12723 "fix Issue 22060 - importC: Multiple forward declarations result in error struct conflicts with struct" was merged into master: - a1b715a5dd97004595bd7b2d5a8049e8ba85d438 by Iain Buclaw: fix Issue 22060 - importC: Multiple forward declarations result in error struct conflicts with struct https://github.com/dlang/dmd/pull/12723