[LLVMbugs] [Bug 21982] New: Add Clang warning about extern declarations in C and C++ files

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Dec 19 09:53:33 PST 2014


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

            Bug ID: 21982
           Summary: Add Clang warning about extern declarations in C and
                    C++ files
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: eugene.zelenko at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Hi!

I think will be good idea if Clang will produce warnings when extern
declarations are placed in C/C++ files (not included from other files).

Such declarations are definitely belong to headers, so their appearance in
source files are indication of bad coding practices.

Intel compiler produces such warnings as "warning #1419: external declaration
in primary source file".

Eugene.

-- 
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/20141219/e95c6937/attachment.html>


More information about the llvm-bugs mailing list