www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 952] New: Strange "Error:" prefix on some warning messages

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=952

           Summary: Strange "Error:" prefix on some warning messages
           Product: D
           Version: 1.005
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: smjg iname.com


Some of the warning messages have this strange wording error (no pun intended)
in them.  For example:

----------
int main() {
        return 1;
        return 0;
}
----------
warning - warning_unreachable.d(3): Error: statement is not reachable
----------

Why the label "Error:" here?  It isn't an error, it's a warning.  Presumably
the intention was for it to output

warning - warning_unreachable.d(3): statement is not reachable

We should get rid of the string "Error:" label especially from warning
messages.  Really, it shouldn't be in any complier messages, perhaps apart from
those for which it doesn't make sense to give a filename and line number.

You could debate whether it should be this or

warning_unreachable.d(3): Warning: statement is not reachable

but that's an aside.


-- 
Feb 11 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=952


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED



It currently outputs:

testx.d(3): Warning: statement is not reachable

when compiled with -w

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 08 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=952


Stewart Gordon <smjg iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |



This bug is about warning messages _generally_, not just this particular one.

And a new instance has cropped up:

----- switch_fallthrough_b.d -----
void main() {
    char c = 'x';
    switch(c) {
        case 'U', 'u' :
            c = 'q';
        case 'L', 'l' :
            c = 'r';
            // code . . .
        default:
    }
}
----------
C:\Users\Stewart\Documents\Programming\D\Tests>dmd switch_fallthrough_b.d

C:\Users\Stewart\Documents\Programming\D\Tests>dmd -w switch_fallthrough_b.d
switch_fallthrough_b.d(6): Error: switch case fallthrough - use 'goto case;' if
intended
switch_fallthrough_b.d(9): Error: switch case fallthrough - use 'goto default;'
if intended
----------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 17 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=952


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



17:33:13 PST ---

 And a new instance has cropped up:
This will be resolved with pull for Issue 6552. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 17 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=952


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED



 This bug is about warning messages _generally_, not just this particular one.
That fix applied to all warning messages. It was nothing to do with that particular one. The other instance in comment 2 has been fixed in bug 6552. Please reopen (or create a new bug) if you find any still-failing failing test cases. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 21 2013