https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105401

--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
Actually never mind about point 3: I do actually get warnings from -Winline
when I turn on optimizations:

$ /usr/local/bin/gcc -c -Wall -Wextra -Wc++-compat -Winline -O2
labels_as_values.c
labels_as_values.c: In function 'asdf':
labels_as_values.c:3:19: warning: function 'asdf' can never be copied because
it saves address of local label in a static variable [-Winline]
    3 | static inline int asdf(void)
      |                   ^~~~
labels_as_values.c: In function 'zxcv':
labels_as_values.c:18:19: warning: function 'zxcv' can never be copied because
it saves address of local label in a static variable [-Winline]
   18 | static inline int zxcv(int i)
      |                   ^~~~
labels_as_values.c: In function 'qwerty':
labels_as_values.c:3:19: warning: inlining failed in call to 'asdf': function
not inlinable [-Winline]
    3 | static inline int asdf(void)
      |                   ^~~~
labels_as_values.c:36:30: note: called from here
   36 |     return (zxcv(array[i]) + asdf());
      |                              ^~~~~~
labels_as_values.c:18:19: warning: inlining failed in call to 'zxcv': function
not inlinable [-Winline]
   18 | static inline int zxcv(int i)
      |                   ^~~~
labels_as_values.c:36:13: note: called from here
   36 |     return (zxcv(array[i]) + asdf());
      |             ^~~~~~~~~~~~~~
$

Points 1 and 2 still stand, though.

Reply via email to