[LLVMbugs] [Bug 8630] New: Don't complain about '-g' in link commands

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 16 21:17:47 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=8630

           Summary: Don't complain about '-g' in link commands
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chandlerc at gmail.com
                CC: llvmbugs at cs.uiuc.edu


$ clang --version
clang version 2.9 (trunk 119002)
Target: x86_64-unknown-linux-gnu
Thread model: posix

$ echo "int main() { return 0; }" | clang -xc - -c -o main.o
$ clang -g main.o
clang: warning: argument unused during compilation: '-g'

The warning is a lie (no compilation is happening).
It is also annoying.

It also causes many GDB testsuite "unresolved" outcomes, because
TCL/runtest/expect thinks that if a command produced stderr output,
then the command failed:

$ expect
expect1.1> exec clang -g main.o
clang: warning: argument unused during compilation: '-g'
   while executing                      <<< this indicates TCL exception
"exec clang -g main.o"
expect1.2> exec /bin/true
expect1.3> exec /bin/false
child process exited abnormally
   while executing
"exec /bin/false"
expect1.4>

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list