[llvm-bugs] [Bug 34822] New: Implicitly defined functions don't cause redefinition errors

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 3 17:25:59 PDT 2017


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

            Bug ID: 34822
           Summary: Implicitly defined functions don't cause redefinition
                    errors
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: erich.keane at intel.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

See here: https://godbolt.org/g/ZhViUu

int main(void) {
        {int i = sizeof(foo());}
        {extern int foo;}
}

Typically the 'extern int foo;' should cause a "error: redefinition of 'foo' as
different kind of symbol", however as a regression to 5.0, this no longer
happens.

Note that making it NOT an implicit declaration causes the error to fire
properly.

-- 
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/20171004/73ad9989/attachment.html>


More information about the llvm-bugs mailing list