D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 23005 - importC: 'alignof' or 'mangleof' as member name gives redefinition error
Summary: importC: 'alignof' or 'mangleof' as member name gives redefinition error
Status: RESOLVED MOVED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: ImportC, rejects-valid
Depends on:
Blocks:
 
Reported: 2022-04-10 09:27 UTC by duser
Modified: 2022-04-18 06:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description duser 2022-04-10 09:27:48 UTC
struct S { int alignof, mangleof; };
union U { int alignof, mangleof; };
enum E { alignof, mangleof };

test.c(1): Error: variable `test.S.alignof` `.alignof` property cannot be redefined
test.c(1): Error: variable `test.S.mangleof` `.mangleof` property cannot be redefined
test.c(2): Error: variable `test.U.alignof` `.alignof` property cannot be redefined
test.c(2): Error: variable `test.U.mangleof` `.mangleof` property cannot be redefined
test.c(3): Error: enum member `test.E.alignof` `.alignof` property cannot be redefined
test.c(3): Error: enum member `test.E.mangleof` `.mangleof` property cannot be redefined
Comment 1 Walter Bright 2022-04-18 06:56:06 UTC
merged with 23004