digitalmars.D.bugs - [Issue 223] New: Error message for void.init doesn't specify error location
- d-bugmail puremagic.com (22/22) Jun 24 2006 http://d.puremagic.com/issues/show_bug.cgi?id=223
- Thomas Kuehne (11/17) Jun 30 2006 -----BEGIN PGP SIGNED MESSAGE-----
- d-bugmail puremagic.com (8/8) Sep 10 2006 http://d.puremagic.com/issues/show_bug.cgi?id=223
- d-bugmail puremagic.com (5/5) Sep 13 2006 http://d.puremagic.com/issues/show_bug.cgi?id=223
- d-bugmail puremagic.com (16/16) Sep 15 2006 http://d.puremagic.com/issues/show_bug.cgi?id=223
- Thomas Kuehne (12/21) Sep 20 2006 -----BEGIN PGP SIGNED MESSAGE-----
- d-bugmail puremagic.com (14/14) Oct 20 2007 http://d.puremagic.com/issues/show_bug.cgi?id=223
- d-bugmail puremagic.com (9/9) Jun 19 2008 http://d.puremagic.com/issues/show_bug.cgi?id=223
http://d.puremagic.com/issues/show_bug.cgi?id=223
Summary: Error message for void.init doesn't specify error
location
Product: D
Version: 0.161
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: trivial
Priority: P3
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: deewiant gmail.com
int i = void.init;
The above code correctly produces the error "integral constant must be scalar
type, not void". Alas, DMD neglects to inform where the error occurred: even
when compiling a large project containing many long files, the error message is
precisely the quoted string.
Whilst not strictly speaking a bug, I believe this is enough of an issue that
it merits fixing.
--
Jun 24 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-06-24:http://d.puremagic.com/issues/show_bug.cgi?id=223int i = void.init; The above code correctly produces the error "integral constant must be scalar type, not void". Alas, DMD neglects to inform where the error occurred: even when compiling a large project containing many long files, the error message is precisely the quoted string.test case: http://dstress.kuehne.cn/nocompile/v/void_02_A.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEpNuu3w+/yD4P9tIRAnKsAKClFHKYfzU+GcaHPL76ZLhXEPf1gwCgzM7I 9dLrsFP5ma2oV7VoyoV8/M4= =V8rq -----END PGP SIGNATURE-----
Jun 30 2006
http://d.puremagic.com/issues/show_bug.cgi?id=223
smjg iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg iname.com
What makes you think it's "not strictly speaking a bug"?
--
Sep 10 2006
http://d.puremagic.com/issues/show_bug.cgi?id=223 Poor wording, or a brain fart, on my part. It is a bug, but since the error is reported correctly it's not that big of a deal. --
Sep 13 2006
http://d.puremagic.com/issues/show_bug.cgi?id=223
lio lunesu.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Error message for void.init |Error message for unset
|doesn't specify error |constants doesn't specify
|location |error location
The same incomplete error is generated for the following code:
void main()
{
const int x;
}
DMD v0.166:
UnhandledError(0,0): Error: integral constant must be scalar type, not void
--
Sep 15 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-09-15:http://d.puremagic.com/issues/show_bug.cgi?id=223The same incomplete error is generated for the following code: void main() { const int x; } DMD v0.166: UnhandledError(0,0): Error: integral constant must be scalar type, not voidAdded to DStress as http://dstress.kuehne.cn/nocompile/c/const_38_A.d http://dstress.kuehne.cn/nocompile/c/const_38_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFEZt3LK5blCcjpWoRAsWlAKCZMsDwbbO6la3mAqc1LQtmU2BNdACdEguD QY9NRc/gJIQHFlN0isZPOLA= =kk1z -----END PGP SIGNATURE-----
Sep 20 2006
http://d.puremagic.com/issues/show_bug.cgi?id=223
The noise past the original bug report seems to have gotten the original bug
overlooked.
void main()
{
int i == void.init;
}
Produces this error, without a line number for the second error:
bug223.d(3): Error: void does not have an initializer
Error: integral constant must be scalar type, not void.
NOTE: dropping the .init part changes the semantics to 'don't default
initialize i' and there's no error at all, which is the correct behavior.
--
Oct 20 2007
http://d.puremagic.com/issues/show_bug.cgi?id=223
clugdbug yahoo.com.au changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
This works now (DMD 1.030 & 2.015).
--
Jun 19 2008









Thomas Kuehne <thomas-dloop kuehne.cn> 