This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: don't output strings just because of debug information


Ian Lance Taylor wrote:
> Alexandre Oliva <aoliva@redhat.com> writes:
> 
>> From  Alexandre Oliva  <aoliva@redhat.com>
>>
>> 	* dwarf2out.c (reference_to_unused): Don't emit strings in
>> 	initializers just because of debug information.
> 
> This is OK.

I think it's OK too, but I have a couple of follow-on requests. :-)

1. tree.h doesn't document TREE_ASM_WRITTEN as applying to STRING_CST.
I didn't know that we set it on STRING_CST, so I was initially surprised
by Alexandre's patch.  Alexandre, would you mind updating that?

2. Is it possible to write a test case?  I would think that doing
something like:

  const char *p = "astringunlikelytoappearinafile";

with a dg-final to scan the asm file for the string would work.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]