https://bugs.llvm.org/show_bug.cgi?id=34872

            Bug ID: 34872
           Summary: lld emits a misleading diagnostic
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

If you take the example in https://bugs.llvm.org/show_bug.cgi?id=34870 and link
with lld, you get two diagnostics.

[davide@localhost bin]$ ./clang fmod.c -O0 -fuse-ld=lld
/home/davide/work/llvm/build-release/bin/./ld.lld: error: undefined symbol:
fmod
>>> referenced by fmod.c
>>>               /tmp/fmod-208cee.o:(foo)

/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
invocation)

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
it's undefined.
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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to