Bug 991 – void static array: integral constant must be scalar type, not void

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-02-21T14:30:00Z
Last change time
2014-02-16T15:24:08Z
Keywords
rejects-valid
Assigned to
nobody
Creator
chris

Comments

Comment #0 by chris — 2007-02-21T14:30:47Z
I wanted to reserve some space without any particular type, void[8] x; // DMD 1.007: Error: integral constant must be scalar type, not void
Comment #1 by thomas-dloop — 2007-02-26T05:37:50Z
Comment #2 by e-t172 — 2008-07-08T06:42:54Z
Confirmed and still happening with DMD 1.030 and GDC r231. DMD 1.030 result: --- Error: integral constant must be scalar type, not void --- GDC r231 / GCC 4.1.2 / x86_64 result: --- Error: integral constant must be scalar type, not void cc1d: ../../gcc-4.1.2-gdc/gcc/d/dmd/todt.c:85: dt_t* createTsarrayDt(dt_t*, Type*): Assertion `tsa->size(0) % eoa_size == 0' failed. test.d:0: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. ---
Comment #3 by yebblies — 2011-06-11T10:43:50Z
This works in dmd 1.068 and dmd 2.053, if you use a void initializer.