public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question about default_elf_asm_named_section function
@ 2011-10-13 11:41 Iyer, Balaji V
  2011-10-14  6:59 ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Iyer, Balaji V @ 2011-10-13 11:41 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org'

Hello Everyone,
	This email is in reference to the "default_elf_asm_named_section" function in the varasm.c file. 

This function is defined like this:

void
default_elf_asm_named_section (const char *name, unsigned int flags,
                               tree decl ATTRIBUTE_UNUSED)


But, inside the function, there is this if-statement:


      if (HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE))
        {
          if (TREE_CODE (decl) == IDENTIFIER_NODE)
            fprintf (asm_out_file, ",%s,comdat", IDENTIFIER_POINTER (decl));
          else
            fprintf (asm_out_file, ",%s,comdat",
                     IDENTIFIER_POINTER (DECL_COMDAT_GROUP (decl)));
        }


The decl is set with "ATTRIBUTE_UNUSED" but the if-statement is using "decl." Should we remove the attribute unused tag near the "tree decl" or is the if-statement a deadcode that should never be ?

Thanks,

Balaji V. Iyer.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-14 20:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-13 11:41 Question about default_elf_asm_named_section function Iyer, Balaji V
2011-10-14  6:59 ` Ian Lance Taylor
2011-10-14 17:34   ` Iyer, Balaji V
2011-10-15  6:08     ` Ian Lance Taylor
2011-10-15  8:58       ` Iyer, Balaji V

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).