* tiny speed tweak to check_global_declarations
@ 2004-06-03 23:59 Geoffrey Keating
0 siblings, 0 replies; only message in thread
From: Geoffrey Keating @ 2004-06-03 23:59 UTC (permalink / raw)
To: gcc-patches
It turns out that some symbols actually don't have a
DECL_ASSEMBLER_NAME at this point in the compilation; let's keep it
that way, maybe we'll never need to make one at all.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-lessasmname.patch=====================
2004-06-03 Geoffrey Keating <geoffk@apple.com>
* toplev.c (check_global_declarations): Don't ask for
DECL_ASSEMBLER_NAME unless the function really is declared
static and not defined.
*** toplev.c.~1.898.~ Wed May 26 14:18:56 2004
--- toplev.c Thu Jun 3 07:00:22 2004
***************
*** 1515,1526 ****
because many programs have static variables
that exist only to get some text into the object file. */
if (TREE_CODE (decl) == FUNCTION_DECL
- && (warn_unused_function
- || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
&& DECL_INITIAL (decl) == 0
&& DECL_EXTERNAL (decl)
&& ! DECL_ARTIFICIAL (decl)
! && ! TREE_PUBLIC (decl))
{
if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
pedwarn ("%J'%F' used but never defined", decl, decl);
--- 1515,1526 ----
because many programs have static variables
that exist only to get some text into the object file. */
if (TREE_CODE (decl) == FUNCTION_DECL
&& DECL_INITIAL (decl) == 0
&& DECL_EXTERNAL (decl)
&& ! DECL_ARTIFICIAL (decl)
! && ! TREE_PUBLIC (decl)
! && (warn_unused_function
! || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
{
if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
pedwarn ("%J'%F' used but never defined", decl, decl);
============================================================
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-06-03 23:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 23:59 tiny speed tweak to check_global_declarations Geoffrey Keating
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).