This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/54817] New: Warning about extern declarations in C and C++ files.
- From: "eugene.zelenko at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 04 Oct 2012 23:41:05 +0000
- Subject: [Bug c/54817] New: Warning about extern declarations in C and C++ files.
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: eugene.zelenko@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.