This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/54224] Bogus -Wunused-function warning with static function
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 11 Aug 2012 09:03:06 +0000
- Subject: [Bug middle-end/54224] Bogus -Wunused-function warning with static function
- Auto-submitted: auto-generated
- References: <bug-54224-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54224
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
Summary|[4.8 Regression] Bogus |Bogus -Wunused-function
|-Wunused-function warning |warning with static
|with static function |function
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-08-11 09:03:06 UTC ---
I just realized that I misremembered the TREE_PUBLIC patch: It has been
committed after 4.7 was branched (cf. PR40973 and PR40973 / PR52916). Thus, it
is not a regression.
Another, possibly related question is: Why is the function "hello_integer" not
inlined into its only user? The compiler does realize that the variable is
local as in the "nm" output the "t" shows and the ".constprop.0" suffix with
-O2/-O3/-Ofast:
0000000000000000 t __mod_say_hello_MOD_hello_integer.constprop.0
0000000000000080 T __mod_say_hello_MOD_say_hello