diff options
author | Geoffrey Keating <geoffk@redhat.com> | 2002-07-29 23:53:47 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2002-07-29 23:53:47 +0000 |
commit | cba57c9d40057fa78efc9a404ab4ae7101a59dcb (patch) | |
tree | 9be033bfe60b1896cea27bb30921509c89d43366 /gcc/doc/gty.texi | |
parent | 76a8ecba5ea85da902faee400bfc6655693f7f66 (diff) | |
download | gcc-cba57c9d40057fa78efc9a404ab4ae7101a59dcb.zip gcc-cba57c9d40057fa78efc9a404ab4ae7101a59dcb.tar.gz gcc-cba57c9d40057fa78efc9a404ab4ae7101a59dcb.tar.bz2 |
gty.texi (GGC Roots): Clarify that the list of syntaxes is exhaustive.
* doc/gty.texi (GGC Roots): Clarify that the list of syntaxes
is exhaustive.
(Files): Improve documentation on generated source files.
* doc/extend.texi (Translation implementation): Document what
diagnostics look like.
(Identifiers implementation): Document that there's normally no
limit on identifier names.
(Integers implementation): Document two's complement.
(Hints implementation): Document that GCC honours 'inline', mostly.
(Preprocessing directives implementation): Document that GCC
requires the current time.
From-SVN: r55857
Diffstat (limited to 'gcc/doc/gty.texi')
-rw-r--r-- | gcc/doc/gty.texi | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/gcc/doc/gty.texi b/gcc/doc/gty.texi index 8dedc6a..f854b80 100644 --- a/gcc/doc/gty.texi +++ b/gcc/doc/gty.texi @@ -218,6 +218,14 @@ two syntaxes it accepts to indicate a root: @verb{|static GTY (([options])) [type] ID;|} @end enumerate +These are the only syntaxes that are accepted. In particular, if you +want to mark a variable that is only declared as +@verbatim +int ID; +@end verbatim +or similar, you should either make it @code{static} or you should create +a @code{extern} declaration in a header file somewhere. + @node Files @section Source Files Containing Type Information @cindex generated files @@ -254,16 +262,28 @@ should be included in the @file{gtfiles} variable for such front ends. @end enumerate @item -You need to include the file that the type machinery will generate in -the source file you just changed. The file will be called -@file{gt-@var{path}.h} where @var{path} is the pathname from the -@file{gcc} directory with slashes replaced by @verb{|-|}. Don't forget -to mention this file as a dependency in the @file{Makefile}! +If the file was a header file, you'll need to check that it's included +in the right place to be visible to the generated files. For a back-end +header file, this should be done automatically. For a front-end header +file, it needs to be included by the same file that includes +@file{gtype-@var{lang}.h}. For other header files, it needs to be +included in @file{gtype-desc.c}, which is a generated file, so add it to +@code{ifiles} in @code{open_base_file} in @file{gengtype.c}. + +For source files that aren't header files, the machinery will generate a +header file that should be included in the source file you just changed. +The file will be called @file{gt-@var{path}.h} where @var{path} is the +pathname relative to the @file{gcc} directory with slashes replaced by +@verb{|-|}, so for example the header file to be included in +@file{objc/objc-parse.c} is called @file{gt-objc-objc-parse.c}. The +generated header file should be included after everything else in the +source file. Don't forget to mention this file as a dependency in the +@file{Makefile}! @item -Finally, you need to arrange to add a @file{Makefile} rule that will -ensure this file can be built. This is done by making it a dependency -of @code{s-gtype}, like this: +If a new @file{gt-@var{path}.h} file is needed, you need to arrange to +add a @file{Makefile} rule that will ensure this file can be built. +This is done by making it a dependency of @code{s-gtype}, like this: @verbatim gt-path.h : s-gtype ; @true @end verbatim |