This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: Add -ggo option
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 4 Nov 2010 00:58:06 +0000 (UTC)
- Subject: Re: PATCH RFA: Add -ggo option
- References: <mcrzktqhxex.fsf@google.com>
On Wed, 3 Nov 2010, Ian Lance Taylor wrote:
> This patch adds a -ggo option to gcc. This option is used when building
> the Go library. The Go library calls libc functions directly, which
> means that it needs to know the layout of structures like stat and the
> size of types like uid_t. I implemented this by adding a -ggo option to
> gcc which generates debugging information as Go language comments in the
> assembler file. The shell script mksysinfo.sh in the libgo library uses
> that like this:
Why is this a -g option rather than -f (writing to a separate file rather
than the .s output)? It seems much more closely related to
-fdump-ada-spec (or -aux-info, though that's a legacy option name) than to
other -g options.
> +#include "tm.h"
Which target macros does this code need?
> + {
> + if (ISALPHA (*p) || *p == '_')
> + {
> + const char *start;
> + char *n;
> +
> + start = p;
> + while (ISALNUM (*p) || *p == '_')
What happens if you have an extended identifier (represented internally in
UTF-8) as a macro name? Likewise, for all the various uses of identifiers
through IDENTIFIER_POINTER?
--
Joseph S. Myers
joseph@codesourcery.com