diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-18 01:20:48 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-18 01:20:48 +0000 |
commit | a0ecd6b1608c0d07c6a388a764c77a893de79b61 (patch) | |
tree | b8bb49bcf07541a2953d86f7d22e13ca077c4398 /gcc/doc/c-tree.texi | |
parent | f73d7f5d65f6a186b6632b5d2e43d7e43faf5bad (diff) | |
download | gcc-a0ecd6b1608c0d07c6a388a764c77a893de79b61.tar.gz |
* doc/c-tree.texi, doc/compat.texi, doc/cpp.texi,
doc/cppopts.texi, doc/extend.texi, doc/install.texi,
doc/interface.texi, doc/invoke.texi, doc/libgcc.texi, doc/md.texi,
doc/objc.texi, doc/rtl.texi, doc/tm.texi, doc/trouble.texi: Use
@smallexample instead of @example.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76075 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/c-tree.texi')
-rw-r--r-- | gcc/doc/c-tree.texi | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/gcc/doc/c-tree.texi b/gcc/doc/c-tree.texi index 9151fec67f5..8a72b920da8 100644 --- a/gcc/doc/c-tree.texi +++ b/gcc/doc/c-tree.texi @@ -1,4 +1,4 @@ -@c Copyright (c) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +@c Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. @c Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -98,24 +98,24 @@ Many macros behave as predicates. Many, although not all, of these predicates end in @samp{_P}. Do not rely on the result type of these macros being of any particular type. You may, however, rely on the fact that the type can be compared to @code{0}, so that statements like -@example +@smallexample if (TEST_P (t) && !TEST_P (y)) x = 1; -@end example +@end smallexample @noindent and -@example +@smallexample int i = (TEST_P (t) != 0); -@end example +@end smallexample @noindent are legal. Macros that return @code{int} values now may be changed to return @code{tree} values, or other pointers in the future. Even those that continue to return @code{int} may return multiple nonzero codes where previously they returned only zero and one. Therefore, you should not write code like -@example +@smallexample if (TEST_P (t) == 1) -@end example +@end smallexample @noindent as this code is not guaranteed to work correctly in the future. @@ -871,15 +871,15 @@ This predicate holds if the declaration was implicitly generated by the compiler. For example, this predicate will hold of an implicitly declared member function, or of the @code{TYPE_DECL} implicitly generated for a class type. Recall that in C++ code like: -@example +@smallexample struct S @{@}; -@end example +@end smallexample @noindent is roughly equivalent to C code like: -@example +@smallexample struct S @{@}; typedef struct S S; -@end example +@end smallexample The implicitly generated @code{typedef} declaration is represented by a @code{TYPE_DECL} for which @code{DECL_ARTIFICIAL} holds. @@ -1029,9 +1029,9 @@ occurred. If a friend function is defined in a class scope, the @code{DECL_FRIEND_CONTEXT} macro can be used to determine the class in which it was defined. For example, in -@example +@smallexample class C @{ friend void f() @{@} @}; -@end example +@end smallexample @noindent the @code{DECL_CONTEXT} for @code{f} will be the @code{global_namespace}, but the @code{DECL_FRIEND_CONTEXT} will be the @@ -1378,7 +1378,7 @@ the expression has been omitted. A substatement may in fact be a list of statements, connected via their @code{TREE_CHAIN}s. So, you should always process the statement tree by looping over substatements, like this: -@example +@smallexample void process_stmt (stmt) tree stmt; @{ @@ -1397,7 +1397,7 @@ void process_stmt (stmt) stmt = TREE_CHAIN (stmt); @} @} -@end example +@end smallexample In other words, while the @code{then} clause of an @code{if} statement in C++ can be only one statement (although that one statement may be a compound statement), the intermediate representation will sometimes use @@ -1408,18 +1408,18 @@ several statements chained together. Used to represent an inline assembly statement. For an inline assembly statement like: -@example +@smallexample asm ("mov x, y"); -@end example +@end smallexample The @code{ASM_STRING} macro will return a @code{STRING_CST} node for @code{"mov x, y"}. If the original statement made use of the extended-assembly syntax, then @code{ASM_OUTPUTS}, @code{ASM_INPUTS}, and @code{ASM_CLOBBERS} will be the outputs, inputs, and clobbers for the statement, represented as @code{STRING_CST} nodes. The extended-assembly syntax looks like: -@example +@smallexample asm ("fsinx %1,%0" : "=f" (result) : "f" (angle)); -@end example +@end smallexample The first string is the @code{ASM_STRING}, containing the instruction template. The next two strings are the output and inputs, respectively; this statement has no clobbers. As this example indicates, ``plain'' @@ -1451,9 +1451,9 @@ the same type as the condition expression in the switch statement. Otherwise, if both @code{CASE_LOW} and @code{CASE_HIGH} are defined, the statement is a range of case labels. Such statements originate with the extension that allows users to write things of the form: -@example +@smallexample case 2 ... 5: -@end example +@end smallexample The first value will be @code{CASE_LOW}, while the second will be @code{CASE_HIGH}. @@ -1562,9 +1562,9 @@ evaluated, the statement should be executed. Then, the @code{TREE_VALUE} should be used as the conditional expression itself. This representation is used to handle C++ code like this: -@example +@smallexample if (int i = 7) @dots{} -@end example +@end smallexample where there is a new local variable (or variables) declared within the condition. @@ -1584,9 +1584,9 @@ the @code{LABEL_DECL} with @code{DECL_NAME}. If the function uses the G++ ``named return value'' extension, meaning that the function has been defined like: -@example +@smallexample S f(int) return s @{@dots{}@} -@end example +@end smallexample then there will be a @code{RETURN_INIT}. There is never a named returned value for a constructor. The first argument to the @code{RETURN_INIT} is the name of the object returned; the second @@ -1601,9 +1601,9 @@ constructed in the place where the object will be returned. Used to represent a @code{return} statement. The @code{RETURN_EXPR} is the expression returned; it will be @code{NULL_TREE} if the statement was just -@example +@smallexample return; -@end example +@end smallexample @item SCOPE_STMT @@ -1803,9 +1803,9 @@ noted otherwise, the operands to an expression are accessed using the @code{TREE_OPERAND} macro. For example, to access the first operand to a binary plus expression @code{expr}, use: -@example +@smallexample TREE_OPERAND (expr, 0) -@end example +@end smallexample @noindent As this example indicates, the operands are zero-indexed. @@ -1819,10 +1819,11 @@ These nodes represent integer constants. Note that the type of these constants is obtained with @code{TREE_TYPE}; they are not always of type @code{int}. In particular, @code{char} constants are represented with @code{INTEGER_CST} nodes. The value of the integer constant @code{e} is -given by @example +given by +@smallexample ((TREE_INT_CST_HIGH (e) << HOST_BITS_PER_WIDE_INT) + TREE_INST_CST_LOW (e)) -@end example +@end smallexample @noindent HOST_BITS_PER_WIDE_INT is at least thirty-two on all platforms. Both @code{TREE_INT_CST_HIGH} and @code{TREE_INT_CST_LOW} return a @@ -1893,11 +1894,11 @@ or @code{UNION_TYPE} within which the pointer points), and the Note that the @code{DECL_CONTEXT} for the @code{PTRMEM_CST_MEMBER} is in general different from the @code{PTRMEM_CST_CLASS}. For example, given: -@example +@smallexample struct B @{ int i; @}; struct D : public B @{@}; int D::*dp = &D::i; -@end example +@end smallexample @noindent The @code{PTRMEM_CST_CLASS} for @code{&D::i} is @code{D}, even though the @code{DECL_CONTEXT} for the @code{PTRMEM_CST_MEMBER} is @code{B}, @@ -2181,9 +2182,9 @@ sites. @item STMT_EXPR These nodes are used to represent GCC's statement-expression extension. The statement-expression extension allows code like this: -@example +@smallexample int f() @{ return (@{ int j; j = 3; j + 7; @}); @} -@end example +@end smallexample In other words, an sequence of statements may occur where a single expression would normally appear. The @code{STMT_EXPR} node represents such an expression. The @code{STMT_EXPR_STMT} gives the statement @@ -2192,13 +2193,13 @@ value of the expression is the value of the last sub-statement in the @code{COMPOUND_STMT}. More precisely, the value is the value computed by the last @code{EXPR_STMT} in the outermost scope of the @code{COMPOUND_STMT}. For example, in: -@example +@smallexample (@{ 3; @}) -@end example +@end smallexample the value is @code{3} while in: -@example +@smallexample (@{ if (x) @{ 3; @} @}) -@end example +@end smallexample (represented by a nested @code{COMPOUND_STMT}), there is no value. If the @code{STMT_EXPR} does not yield a value, it's type will be @code{void}. |