www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14905] New: duplicate error message: 'Warning: statement is

https://issues.dlang.org/show_bug.cgi?id=14905

          Issue ID: 14905
           Summary: duplicate error message: 'Warning: statement is not
                    reachable'
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: timothee.cour2 gmail.com

dmd -w -c -o- main.d
main.d(3): Warning: statement is not reachable
main.d(3): Warning: statement is not reachable

main.d:
----
bool fun(string s)() {
  return true;
  return false;
}

void main(){
  cast(void)fun!"a";
  cast(void)fun!"b";
}
----

Could we have a global hash of all generated warning/error messages to avoid
repeating them?
(as opposed to a one-off fix to just fix this particular case)

See also relevant discussion:
http://digitalmars-d.puremagic.narkive.com/cml7ma0c/dmd-diagnostic-any-way-to-remove-identical-lines-from-final-dmd-error-log

--
Aug 10 2015