Thread overview
[Issue 22611] ImportC: Need better error messages involving structs
Dec 19, 2021
Lance Bachmeier
Jan 31, 2022
Walter Bright
Feb 02, 2022
Walter Bright
Feb 02, 2022
Lance Bachmeier
Sep 23, 2022
Walter Bright
Dec 17, 2022
Iain Buclaw
Apr 01, 2023
Walter Bright
December 19, 2021
https://issues.dlang.org/show_bug.cgi?id=22611

--- Comment #1 from Lance Bachmeier <lance@lancebachmeier.com> ---
Related: https://issues.dlang.org/show_bug.cgi?id=22610

--
January 31, 2022
https://issues.dlang.org/show_bug.cgi?id=22611

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ImportC
                 CC|                            |bugzilla@digitalmars.com
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--
February 02, 2022
https://issues.dlang.org/show_bug.cgi?id=22611

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
Internally, the compiler does not keep track of which typedefs are pointing to a struct tag, so it's kinda awkward to fix.

--
February 02, 2022
https://issues.dlang.org/show_bug.cgi?id=22611

--- Comment #3 from Lance Bachmeier <lance@lancebachmeier.com> ---
The line number is reported with the error, so that's not a big issue. Something like

Error: 3 extra initializer(s) in struct

would be better than

Error: 3 extra initializer(s) for `struct __tag21`

because __tag21 is not known to the programmer.

--
September 23, 2022
https://issues.dlang.org/show_bug.cgi?id=22611

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=22611

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
April 01, 2023
https://issues.dlang.org/show_bug.cgi?id=22611

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Walter Bright <bugzilla@digitalmars.com> ---
C11 allows extra initializers (gcc warns about them), but ImportC doesn't do
warnings.

The error message no longer appears.

--