[llvm-bugs] [Bug 34872] New: lld emits a misleading diagnostic
llvm-bugs at lists.llvm.org
Sat Oct 7 17:22:40 PDT 2017
Bug ID: 34872
Summary: lld emits a misleading diagnostic
Assignee: unassignedbugs at nondot.org
Reporter: davide at freebsd.org
CC: llvm-bugs at lists.llvm.org
If you take the example in https://bugs.llvm.org/show_bug.cgi?id=34870 and link
with lld, you get two diagnostics.
[davide at localhost bin]$ ./clang fmod.c -O0 -fuse-ld=lld
/home/davide/work/llvm/build-release/bin/./ld.lld: error: undefined symbol:
>>> referenced by fmod.c
/home/davide/work/llvm/build-release/bin/./ld.lld: error: symbol 'fmod' defined
in /tmp/fmod-208cee.o has no type
clang-6.0: error: linker command failed with exit code 1 (use -v to see
The first one, I guess is fine.
The second one, I'm not sure it's really good and/or informative. It doesn't
really matter that the symbol has no type *if* the link already failed because
IMHO, once we emit a diag for undefined we're already in an unrecoverable state
and we should not emit other (unrelated) diagnostics for that symbol.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs