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: PATCH RFA: Add -ggo option


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


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