This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/11377] New: fault or warn modifiable static in extern inline definition


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]