This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/11377] New: fault or warn modifiable static in extern inline definition
- From: "algrant at myrealbox dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jun 2003 10:25:53 -0000
- Subject: [Bug c/11377] New: fault or warn modifiable static in extern inline definition
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11377
Summary: fault or warn modifiable static in extern inline
definition
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: algrant at myrealbox dot com
CC: gcc-bugs at gcc dot gnu dot org
C prohibits this (6.7.4#3):
extern inline int f(void) { static int n; return ++n; }
Even with 'gnu89' extern-inline semantics, gcc does not treat this
predictably, as a given call site may use one of two possible
instances of 'n', so a warning to that effect would be useful.