http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54817



             Bug #: 54817

           Summary: Warning about extern declarations in C and C++ files.

    Classification: Unclassified

           Product: gcc

           Version: unknown

            Status: UNCONFIRMED

          Severity: enhancement

          Priority: P3

         Component: c

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: eugene.zele...@gmail.com





Hi!



I think will be good idea if GCC 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.

Reply via email to