[Issue 24504] New: ImportC: Enum declarations with a mixture of `int` and `uint` literal values cause errors, when targeting Windows, when debug info generation is enabled.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 15 16:43:45 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24504
Issue ID: 24504
Summary: ImportC: Enum declarations with a mixture of `int` and
`uint` literal values cause errors, when targeting
Windows, when debug info generation is enabled.
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: contact at harrygillanders.com
When a C enum has a mixture of `int`s and `uint`s assigned to its values, if
the target is Windows, and debug info generation is enabled, the following
error will occur for each `int` member of the enum that comes before the first
`uint` member: "Error: integer constant expression expected instead of
`cast(uint)<value>`".
Test case:
> // test.c
> // REQUIRED_ARGS: -os=windows -g
>
> typedef enum
> {
> HasIntAndUIntValuesInt = 0,
> HasIntAndUIntValuesUInt = 0x80000000
> } HasIntAndUIntValues;
--
More information about the Digitalmars-d-bugs
mailing list