[LLVMbugs] [Bug 10231] [c99] no error on inline function with static variable

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 26 15:10:49 PDT 2013


Nick Lewycky <nlewycky at google.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Nick Lewycky <nlewycky at google.com> ---
$ clang pr10231.c -fsyntax-only
pr10231.c:2:3: warning: non-constant static local variable in inline function
      may be different in different files [-Wstatic-local-in-inline]
  static int x;
pr10231.c:1:1: note: use 'static' to give inline function 'foo' internal
inline int* foo() {
1 warning generated.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130526/cd81e101/attachment.html>

More information about the llvm-bugs mailing list