This is not rejected:
static int a()
{
return 0;
}
extern int f(void);
inline int f(void)
{
return a();
}
---- CUT ---
This violates C99 6.7.4/2 which says:
An inline definition of a function with external linkage shall not contain a
definition of a
modifiable object with static storage duration, and shall not contain a
reference to an
identifier with internal linkage.
--
Summary: C99 6.7.4/2 is not diagnose
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34735