[Bug c/54817] New: Warning about extern declarations in C and C++ files.
eugene.zelenko at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 4 23:41:00 GMT 2012
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.
More information about the Gcc-bugs
mailing list