This is the mail archive of the
mailing list for the GCC project.
Re: don't output strings just because of debug information
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 09 Dec 2007 16:24:29 -0800
- Subject: Re: don't output strings just because of debug information
- References: <email@example.com> <firstname.lastname@example.org>
Ian Lance Taylor wrote:
> Alexandre Oliva <email@example.com> writes:
>> From Alexandre Oliva <firstname.lastname@example.org>
>> * 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
const char *p = "astringunlikelytoappearinafile";
with a dg-final to scan the asm file for the string would work.
(650) 331-3385 x713