Thread overview |
---|
February 20, 2009 [Issue 2679] New: Spurious "warning - " messages output to console | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2679 Summary: Spurious "warning - " messages output to console Product: D Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: andrei@metalanguage.com The following code outputs a "warning - " message during compilation: template implicitlyConverts(S, T) { enum bool implicitlyConverts = T.sizeof >= S.sizeof && is(typeof({S s; T t = s;}())); } static assert(!implicitlyConverts!(long, short)); void main() { } -- |
February 21, 2009 [Issue 2679] Spurious "warning - " messages and erratic behaviour with is(typeof({void function}())) | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2679 smjg@iname.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smjg@iname.com Keywords| |diagnostic, rejects-valid OS/Version|Linux |All Summary|Spurious "warning - " |Spurious "warning - " |messages output to console |messages and erratic | |behaviour with | |is(typeof({void | |function}())) Version|unspecified |1.040 ------- Comment #1 from smjg@iname.com 2009-02-21 15:45 ------- There's something really fishy going on here. ---------- C:\Users\Stewart\Documents\Programming\D\Tests\bugs>type bz2679a.d bool valid = is(typeof({long s; short t = s;}())); C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd -c bz2679a.d C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd -w -c bz2679a.d warning - C:\Users\Stewart\Documents\Programming\D\Tests\bugs>type bz2679b.d static assert (is(typeof({long s; short t = s;}()))); C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd -c bz2679b.d C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd -w -c bz2679b.d warning - bz2679b.d(1): static assert is false C:\Users\Stewart\Documents\Programming\D\Tests\bugs>type bz2679c.d static assert (!is(typeof({long s; short t = s;}()))); C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd -c bz2679c.d bz2679c.d(1): static assert is false C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd -w -c bz2679c.d warning - C:\Users\Stewart\Documents\Programming\D\Tests\bugs>type bz2679d.d pragma(msg, typeof({long s; short t = s;}()).stringof); C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd -c bz2679d.d void C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd -w -c bz2679d.d warning - bz2679d.d(1): Error: implicit conversion of expression (s) of type lon g to short can cause loss of data void ---------- Not only is it spitting out that message, but the diagnosed validity of the expression inside the typeof seems to depend on a few things. Really, the expression is valid, but when warnings are enabled it gets mixed up. Tested on both 1.040 and 2.025 (Windows) with same effect. -- |
March 11, 2009 [Issue 2679] Spurious "warning - " messages and erratic behaviour with is(typeof({void function}())) | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2679 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from bugzilla@digitalmars.com 2009-03-11 14:54 ------- Fixed dmd 1.041 and 2.026 -- |
Copyright © 1999-2021 by the D Language Foundation