[llvm-bugs] [Bug 50330] New: -ansi is not equivalent to -std=c89 when it comes to linking
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Thu May 13 08:57:37 PDT 2021
    
    
  
https://bugs.llvm.org/show_bug.cgi?id=50330
            Bug ID: 50330
           Summary: -ansi is not equivalent to -std=c89 when it comes to
                    linking
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: public at timruffing.de
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk
Test case:
Setup:
# echo "int main(void){return 0;}" > test.c
# clang -c -o test.o test.c
Now this just works fine:
# clang -std=c89 -o test test.o
But this outputs a warning:
# clang -ansi -o test test.o
clang-11: warning: argument unused during compilation: '-ansi'
[-Wunused-command-line-argument]
The man page describes -ansi as "Same as -std=c89."
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210513/caa98bdd/attachment.html>
    
    
More information about the llvm-bugs
mailing list