This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcov weirdness: local lable being declared
- From: Kean Johnston <jkj at sco dot com>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 30 Jul 2005 14:07:30 -0700
- Subject: Re: gcov weirdness: local lable being declared
- References: <42EBB5B5.6090303@sco.com> <m3irys3v1b.fsf@gossamer.airs.com>
- Reply-to: jkj at sco dot com
I don't understand why the .type and .size information is useless.
Just some further information ... gas thinks it's useless too.
The information is recorded in the object file. I've seen various
No, it's not. At least not with gas 2.15.90.0.3. Just is just
silent about it. The SCO assembler is producing a warning because
if you have .type and .size for a sybol or lable for which
those things have no meaning, it warns you in case you meant
to do something else with the symbol. I believe the warning
message is valid.
In my original post, I asked if checking TREE_STATIC would be
the right thing. While it does shut the warning up, I don't think
it is. What we'd really need is some way to mark a tree as
internal. Then in coverage.c, mark the contructed variable
that way. For example, TREE_INTERNAL (gcov_info) = 1. The
only problem is that in order to do this, we would need to invent
a new bit in tree_common. Although there is an unused bit
available, I am not sure this has wide enough utility to
justify using it. But maybe it does. I leave it up to the
experts to decide.
An second solution would be to have create_coverage()
use a symbol name that isn't an internal lable. For example,
prefixing it with __gcov_. That also solves the problem.
A third alternatie would be to make A_D_O_N smarter,
and check to see if the first character of the name is
a period, and not eject the .size and .type if it is.
Anyone care to advise what the best course of action
would be? I'm leaning towards the second solution.
Kean