[Issue 24022] ImportC: Error: attribute `__anonymous` is used as a type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 30 08:05:25 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24022
Carsten Schlote <carsten.schlote at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carsten.schlote at gmx.net
--- Comment #2 from Carsten Schlote <carsten.schlote at gmx.net> ---
Hi,
i stumbled over this regession bug, too. Simplyfied example to reproduce:
enum_decl.c:
---------------
/// @brief Type ID for signature block
typedef enum FWSIG_TYPE {
E_FWSIG_TYPE_RSA2048 = 0,
E_FWSIG_TYPE_RSA3072,
E_FWSIG_TYPE_RSA4096,
E_FWSIG_TYPE_EC256 = 16,
E_FWSIG_TYPE_ECP384,
E_FWSIG_TYPE_ECP521,
E_FWSIG_TYPE_ED25519 = 32,
E_FWSIG_TYPE_UNKNOWN = -1
}
E_FWSIG_TYPE;
---------------
use_enum_decl.d:
---------------
import enum_decl;
E_FWSIG_TYPE getEnumType(string blah)
{
E_FWSIG_TYPE type = E_FWSIG_TYPE_UNKNOWN;
return type;
}
---------------
$ dmd --version
DMD64 D Compiler v2.103.1
$ dmd -c use_enum_decl.d
use_enum_decl.d(3): Error: attribute `__anonymous` is used as a type
$ dmd-beta --version
DMD64 D Compiler v2.104.1-beta.1-163-gb549aba8d6
$ dmd-beta -c use_enum_decl.d
use_enum_decl.d(3): Error: attribute `__anonymous` is used as a type
$ ldc2 --version
LDC - the LLVM D compiler (1.32.1):
based on DMD v2.102.2 and LLVM 15.0.7
$ ldc2 -c use_enum_decl.d
# Compiles fine as previous versions of DMD did.
--
More information about the Digitalmars-d-bugs
mailing list