tree.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. /* Front-end tree definitions for GNU compiler.
  2. Copyright (C) 1987 Free Software Foundation, Inc.
  3. This file is part of GNU CC.
  4. GNU CC is distributed in the hope that it will be useful,
  5. but WITHOUT ANY WARRANTY. No author or distributor
  6. accepts responsibility to anyone for the consequences of using it
  7. or for whether it serves any particular purpose or works at all,
  8. unless he says so in writing. Refer to the GNU CC General Public
  9. License for full details.
  10. Everyone is granted permission to copy, modify and redistribute
  11. GNU CC, but only under the conditions described in the
  12. GNU CC General Public License. A copy of this license is
  13. supposed to have been given to you along with GNU CC so you
  14. can know your rights and responsibilities. It should be in a
  15. file named COPYING. Among other things, the copyright notice
  16. and this notice must be preserved on all copies. */
  17. /* codes of tree nodes */
  18. #define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM,
  19. enum tree_code {
  20. #include "tree.def"
  21. };
  22. #undef DEFTREECODE
  23. typedef enum tree_code tree_code;
  24. extern char *tree_code_type[];
  25. extern int tree_code_length[];
  26. /* Get the definition of `enum machine_mode' */
  27. #ifndef HAVE_MACHINE_MODES
  28. #define DEF_MACHMODE(SYM, NAME, TYPE, SIZE, UNIT) SYM,
  29. enum machine_mode {
  30. #include "machmode.def"
  31. };
  32. #undef DEF_MACHMODE
  33. #define HAVE_MACHINE_MODES
  34. #endif /* not HAVE_MACHINE_MODES */
  35. #ifndef NUM_MACHINE_MODES
  36. #define NUM_MACHINE_MODES (int) MAX_MACHINE_MODE
  37. #endif
  38. /* Codes that identify the various built in functions
  39. so that expand_call can identify them quickly. */
  40. enum built_in_function
  41. {
  42. NOT_BUILT_IN,
  43. BUILT_IN_ALLOCA,
  44. BUILT_IN_ABS,
  45. BUILT_IN_FABS,
  46. BUILT_IN_LABS,
  47. BUILT_IN_DIV,
  48. BUILT_IN_LDIV,
  49. BUILT_IN_FFLOOR,
  50. BUILT_IN_FCEIL,
  51. BUILT_IN_FMOD,
  52. BUILT_IN_FREM,
  53. BUILT_IN_MEMCPY,
  54. BUILT_IN_MEMCMP,
  55. BUILT_IN_MEMSET,
  56. BUILT_IN_FSQRT,
  57. BUILT_IN_GETEXP,
  58. BUILT_IN_GETMAN
  59. };
  60. #define TREE_UID(NODE) ((NODE)->shared.uid)
  61. #define TREE_TYPE(NODE) ((NODE)->shared.type)
  62. #define TREE_CHAIN(NODE) ((NODE)->shared.chain)
  63. #define TREE_CODE(NODE) ((NODE)->shared.code)
  64. #define TREE_SET_CODE(NODE, VALUE) ((NODE)->shared.code = (VALUE))
  65. #define TREE_LITERAL(NODE) ((NODE)->shared.literal_attr)
  66. #define TREE_STATIC(NODE) ((NODE)->shared.static_attr)
  67. #define TREE_VOLATILE(NODE) ((NODE)->shared.volatile_attr)
  68. #define TREE_THIS_VOLATILE(NODE) ((NODE)->shared.this_vol_attr)
  69. #define TREE_READONLY(NODE) ((NODE)->shared.readonly_attr)
  70. #define TREE_PUBLIC(NODE) ((NODE)->shared.public_attr)
  71. #define TREE_PACKED(NODE) ((NODE)->shared.packed_attr)
  72. #define TREE_NONLOCAL(NODE) ((NODE)->shared.nonlocal_attr)
  73. #define TREE_EXTERNAL(NODE) ((NODE)->shared.external_attr)
  74. #define TREE_PERMANENT(NODE) ((NODE)->shared.permanent_attr)
  75. #define TREE_ADDRESSABLE(NODE) ((NODE)->shared.addressable_attr)
  76. #define TREE_REGDECL(NODE) ((NODE)->shared.regdecl_attr)
  77. #define TREE_UNSIGNED(NODE) ((NODE)->shared.unsigned_attr)
  78. struct tree_shared
  79. {
  80. int uid;
  81. union tree_node *chain;
  82. union tree_node *type;
  83. enum tree_code code : 8; /* Give it a byte only */
  84. /* the attributes: (special properties of node) */
  85. unsigned external_attr : 1; /* name is external,
  86. meaning storage address is assigned by
  87. another module. */
  88. unsigned public_attr : 1; /* name is public in its module.
  89. In C, this means, not declared "static" */
  90. unsigned static_attr : 1; /* variable is static,
  91. meaning storage gets a fixed address. */
  92. unsigned volatile_attr : 1; /* Expression's value can change unpredictably.
  93. If any subexpression is volatile, this is
  94. set, even if this operation itself
  95. is not volatile. */
  96. unsigned packed_attr : 1; /* store this structure field in
  97. a packed manner. For FIELD_DECL nodes.
  98. Could also be relevant for RECORD_TYPE,
  99. ARRAY_TYPE, etc. in Pascal. */
  100. unsigned readonly_attr : 1; /* this var or field cannot be assigned.
  101. Sometimes set in types, but never in a
  102. type that is the type of an expression. */
  103. unsigned literal_attr : 1; /* value of expression is constant.
  104. Appears on all ..._CST nodes,
  105. and occasionally on expression nodes. */
  106. unsigned nonlocal_attr : 1; /* this name is ref'd from an inner block
  107. Cannot happen in C because it does not
  108. allow inner blocks, as of now.
  109. For VAR_DECL nodes, and possibly
  110. FUNCTION_DECL or LABEL_DECL nodes. */
  111. unsigned permanent_attr : 1; /* Nonzero means permanent node;
  112. node will continue to exist for the
  113. entire compiler run. Otherwise it will be
  114. recycled at the end of this function. */
  115. unsigned addressable_attr : 1; /* Nonzero means address of this is needed.
  116. So it cannot be in a register.
  117. For VAR_DECL nodes. */
  118. unsigned regdecl_attr : 1; /* Nonzero means declared `register'.
  119. For VAR_DECL nodes. */
  120. unsigned this_vol_attr : 1; /* Nonzero means this operation is
  121. volatile (as opposed to an operand). */
  122. unsigned unsigned_attr : 1; /* Nonzero means this type or field
  123. is unsigned. */
  124. };
  125. /* In an INTEGER_CST node. These two together make a 64 bit integer.
  126. If the data type is signed, the value is sign-extended to 64 bits
  127. even though not all of them may really be in use.
  128. In an unsigned constant shorter than 64 bits, the extra bits are 0. */
  129. #define TREE_INT_CST_LOW(NODE) ((NODE)->int_cst.int_cst_low)
  130. #define TREE_INT_CST_HIGH(NODE) ((NODE)->int_cst.int_cst_high)
  131. #define INT_CST_LT(A, B) \
  132. (TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B) \
  133. || (TREE_INT_CST_HIGH (A) == TREE_INT_CST_HIGH (B) \
  134. && ((unsigned) TREE_INT_CST_LOW (A) < (unsigned) TREE_INT_CST_LOW (B))))
  135. #define INT_CST_LT_UNSIGNED(A, B) \
  136. ((unsigned) TREE_INT_CST_HIGH (A) < (unsigned) TREE_INT_CST_HIGH (B) \
  137. || ((unsigned) TREE_INT_CST_HIGH (A) == (unsigned) TREE_INT_CST_HIGH (B) \
  138. && ((unsigned) TREE_INT_CST_LOW (A) < (unsigned) TREE_INT_CST_LOW (B))))
  139. struct tree_int_cst
  140. {
  141. char shared[sizeof (struct tree_shared)];
  142. long int_cst_low;
  143. long int_cst_high;
  144. };
  145. /* In REAL_CST, STRING_CST and COMPLEX_CST nodes,
  146. and generally in all kinds of constants that could
  147. be given labels (rather than being immediate). */
  148. #define TREE_CST_RTL(NODE) ((NODE)->real_cst.rtl)
  149. /* In a REAL_CST node. */
  150. #define TREE_REAL_CST(NODE) ((NODE)->real_cst.real_cst)
  151. struct tree_real_cst
  152. {
  153. char shared[sizeof (struct tree_shared)];
  154. struct rtx_def *rtl; /* acts as link to register transfer language
  155. (rtl) info */
  156. double real_cst;
  157. };
  158. /* In a STRING_CST */
  159. #define TREE_STRING_LENGTH(NODE) ((NODE)->string.length)
  160. #define TREE_STRING_POINTER(NODE) ((NODE)->string.pointer)
  161. struct tree_string
  162. {
  163. char shared[sizeof (struct tree_shared)];
  164. struct rtx_def *rtl; /* acts as link to register transfer language
  165. (rtl) info */
  166. int length;
  167. char *pointer;
  168. };
  169. /* In a COMPLEX_CST node. */
  170. #define TREE_REALPART(NODE) ((NODE)->complex.real)
  171. #define TREE_IMAGPART(NODE) ((NODE)->complex.imag)
  172. struct tree_complex
  173. {
  174. char shared[sizeof (struct tree_shared)];
  175. struct rtx_def *rtl; /* acts as link to register transfer language
  176. (rtl) info */
  177. union tree_node *real;
  178. union tree_node *imag;
  179. };
  180. #define IDENTIFIER_LENGTH(NODE) ((NODE)->identifier.length)
  181. #define IDENTIFIER_POINTER(NODE) ((NODE)->identifier.pointer)
  182. #define IDENTIFIER_GLOBAL_VALUE(NODE) ((NODE)->identifier.global_value)
  183. #define IDENTIFIER_LOCAL_VALUE(NODE) ((NODE)->identifier.local_value)
  184. #define IDENTIFIER_LABEL_VALUE(NODE) ((NODE)->identifier.label_value)
  185. struct tree_identifier
  186. {
  187. char shared[sizeof (struct tree_shared)];
  188. int length;
  189. char *pointer;
  190. union tree_node *global_value;
  191. union tree_node *local_value;
  192. union tree_node *label_value;
  193. };
  194. /* In a TREE_LIST node. */
  195. #define TREE_PURPOSE(NODE) ((NODE)->exp.operands[0])
  196. #define TREE_VALUE(NODE) ((NODE)->exp.operands[1])
  197. /* In a SAVE_EXPR node. */
  198. #define SAVE_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[1])
  199. /* In a CALL_EXPR node. */
  200. #define CALL_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[2])
  201. #define TREE_OPERAND(NODE, I) ((NODE)->exp.operands[I])
  202. struct tree_exp
  203. {
  204. char shared[sizeof (struct tree_shared)];
  205. union tree_node *operands[1];
  206. };
  207. /* In a data type node. */
  208. #define TYPE_SIZE(NODE) ((NODE)->type.size)
  209. #define TYPE_SIZE_UNIT(NODE) ((NODE)->type.size_unit)
  210. #define TYPE_MODE(NODE) ((NODE)->type.mode)
  211. #define TYPE_ALIGN(NODE) ((NODE)->type.align)
  212. #define TYPE_VALUES(NODE) ((NODE)->type.values)
  213. #define TYPE_DOMAIN(NODE) ((NODE)->type.values)
  214. #define TYPE_FIELDS(NODE) ((NODE)->type.values)
  215. #define TYPE_ARG_TYPES(NODE) ((NODE)->type.values)
  216. #define TYPE_ELT_MODE(NODE) ((NODE)->shared.type)
  217. #define TYPE_SEP(NODE) ((NODE)->type.sep)
  218. #define TYPE_SEP_UNIT(NODE) ((NODE)->type.sep_unit)
  219. #define TYPE_POINTER_TO(NODE) ((NODE)->type.pointer_to)
  220. #define TYPE_MIN_VALUE(NODE) ((NODE)->type.sep)
  221. #define TYPE_MAX_VALUE(NODE) ((NODE)->type.max)
  222. #define TYPE_PRECISION(NODE) ((NODE)->type.sep_unit)
  223. #define TYPE_PARSE_INFO(NODE) ((NODE)->type.parse_info)
  224. #define TYPE_SYMTAB_ADDRESS(NODE) ((NODE)->type.symtab_address)
  225. #define TYPE_NAME(NODE) ((NODE)->type.name)
  226. #define TYPE_NEXT_VARIANT(NODE) ((NODE)->type.next_variant)
  227. #define TYPE_MAIN_VARIANT(NODE) ((NODE)->type.main_variant)
  228. struct tree_type
  229. {
  230. char shared[sizeof (struct tree_shared)];
  231. union tree_node *values;
  232. union tree_node *sep;
  233. union tree_node *size;
  234. enum machine_mode mode;
  235. unsigned char size_unit;
  236. unsigned char align;
  237. unsigned char sep_unit;
  238. enum machine_mode elt_mode;
  239. union tree_node *pointer_to;
  240. int parse_info;
  241. int symtab_address;
  242. union tree_node *name;
  243. union tree_node *max;
  244. union tree_node *next_variant;
  245. union tree_node *main_variant;
  246. };
  247. #define DECL_VOFFSET(NODE) ((NODE)->decl.voffset)
  248. #define DECL_VOFFSET_UNIT(NODE) ((NODE)->decl.voffset_unit)
  249. #define DECL_OFFSET(NODE) ((NODE)->decl.offset)
  250. #define DECL_FUNCTION_CODE(NODE) ((enum built_in_function) (NODE)->decl.offset)
  251. #define DECL_SET_FUNCTION_CODE(NODE,VAL) ((NODE)->decl.offset = (int) (VAL))
  252. #define DECL_NAME(NODE) ((NODE)->decl.name)
  253. #define DECL_CONTEXT(NODE) ((NODE)->decl.context)
  254. #define DECL_ARGUMENTS(NODE) ((NODE)->decl.arguments)
  255. #define DECL_ARG_TYPE(NODE) ((NODE)->decl.arguments)
  256. #define DECL_RESULT(NODE) ((NODE)->decl.result)
  257. #define DECL_INITIAL(NODE) ((NODE)->decl.initial)
  258. #define DECL_SOURCE_FILE(NODE) ((NODE)->decl.filename)
  259. #define DECL_SOURCE_LINE(NODE) ((NODE)->decl.linenum)
  260. #define DECL_SIZE(NODE) ((NODE)->decl.size)
  261. #define DECL_SIZE_UNIT(NODE) ((NODE)->decl.size_unit)
  262. #define DECL_ALIGN(NODE) ((NODE)->decl.align)
  263. #define DECL_MODE(NODE) ((NODE)->decl.mode)
  264. #define DECL_RTL(NODE) ((NODE)->decl.rtl)
  265. #define DECL_BLOCK_SYMTAB_ADDRESS(NODE) ((NODE)->decl.block_symtab_address)
  266. #define DECL_SYMTAB_INDEX(NODE) ((NODE)->decl.block_symtab_address)
  267. struct tree_decl
  268. {
  269. char shared[sizeof (struct tree_shared)];
  270. char *filename;
  271. int linenum;
  272. union tree_node *size;
  273. enum machine_mode mode;
  274. unsigned char size_unit;
  275. unsigned char align;
  276. unsigned char voffset_unit;
  277. union tree_node *name;
  278. union tree_node *context;
  279. int unused;
  280. int offset;
  281. union tree_node *voffset;
  282. union tree_node *arguments;
  283. union tree_node *result;
  284. union tree_node *initial;
  285. struct rtx_def *rtl; /* acts as link to register transfer language
  286. (rtl) info */
  287. int block_symtab_address;
  288. };
  289. /* For LABEL_STMT, GOTO_STMT, RETURN_STMT, LOOP_STMT,
  290. COMPOUND_STMT, ASM_STMT. */
  291. #define STMT_SOURCE_LINE(NODE) ((NODE)->stmt.linenum)
  292. #define STMT_SOURCE_FILE(NODE) ((NODE)->stmt.filename)
  293. #define STMT_BODY(NODE) ((NODE)->stmt.body)
  294. struct tree_stmt
  295. {
  296. char shared[sizeof (struct tree_shared)];
  297. char *filename;
  298. int linenum;
  299. union tree_node *body;
  300. };
  301. /* For IF_STMT. */
  302. /* #define STMT_SOURCE_LINE(NODE) */
  303. /* #define STMT_SOURCE_FILE(NODE) */
  304. #define STMT_COND(NODE) ((NODE)->if_stmt.cond)
  305. #define STMT_THEN(NODE) ((NODE)->if_stmt.thenpart)
  306. #define STMT_ELSE(NODE) ((NODE)->if_stmt.elsepart)
  307. struct tree_if_stmt
  308. {
  309. char shared[sizeof (struct tree_shared)];
  310. char *filename;
  311. int linenum;
  312. union tree_node *cond, *thenpart, *elsepart;
  313. };
  314. /* For LET_STMT and WITH_STMT. */
  315. /* #define STMT_SOURCE_LINE(NODE) */
  316. /* #define STMT_SOURCE_FILE(NODE) */
  317. /* #define STMT_BODY(NODE) */
  318. #define STMT_VARS(NODE) ((NODE)->bind_stmt.vars)
  319. #define STMT_SUPERCONTEXT(NODE) ((NODE)->bind_stmt.supercontext)
  320. #define STMT_BIND_SIZE(NODE) ((NODE)->bind_stmt.bind_size)
  321. #define STMT_TYPE_TAGS(NODE) ((NODE)->bind_stmt.type_tags)
  322. struct tree_bind_stmt
  323. {
  324. char shared[sizeof (struct tree_shared)];
  325. char *filename;
  326. int linenum;
  327. union tree_node *body, *vars, *supercontext, *bind_size, *type_tags;
  328. };
  329. /* For CASE_STMT. */
  330. #define STMT_CASE_INDEX(NODE) ((NODE)->case_stmt.index)
  331. #define STMT_CASE_LIST(NODE) ((NODE)->case_stmt.case_list)
  332. struct tree_case_stmt
  333. {
  334. char shared[sizeof (struct tree_shared)];
  335. char *filename;
  336. int linenum;
  337. union tree_node *index, *case_list;
  338. };
  339. union tree_node
  340. {
  341. struct tree_shared shared;
  342. struct tree_int_cst int_cst;
  343. struct tree_real_cst real_cst;
  344. struct tree_string string;
  345. struct tree_complex complex;
  346. struct tree_identifier identifier;
  347. struct tree_decl decl;
  348. struct tree_type type;
  349. struct tree_exp exp;
  350. struct tree_stmt stmt;
  351. struct tree_if_stmt if_stmt;
  352. struct tree_bind_stmt bind_stmt;
  353. struct tree_case_stmt case_stmt;
  354. };
  355. typedef union tree_node *tree;
  356. #define NULL_TREE (tree) NULL
  357. extern char *oballoc ();
  358. extern char *permalloc ();
  359. extern tree make_node ();
  360. extern tree copy_node ();
  361. extern tree get_identifier ();
  362. extern tree build_int_2 ();
  363. extern tree build_real ();
  364. extern tree build_real_from_string ();
  365. extern tree build_real_from_int_cst ();
  366. extern tree build_complex ();
  367. extern tree build_string ();
  368. extern tree build1 ();
  369. extern tree build2 ();
  370. extern tree build3 ();
  371. extern tree build_tree_list ();
  372. extern tree build_goto ();
  373. extern tree build_return ();
  374. extern tree build_if ();
  375. extern tree build_exit ();
  376. extern tree build_asm_stmt ();
  377. extern tree build_case ();
  378. extern tree build_let ();
  379. extern tree build_loop ();
  380. extern tree build_compound ();
  381. extern tree build_expr_stmt ();
  382. extern tree make_signed_type ();
  383. extern tree make_unsigned_type ();
  384. extern void fixup_unsigned_type ();
  385. extern tree build_pointer_type ();
  386. extern tree build_array_type ();
  387. extern tree build_function_type ();
  388. extern tree build_binary_op ();
  389. extern tree build_indirect_ref ();
  390. extern tree build_unary_op ();
  391. /* Given a type node TYPE, and CONSTP and VOLATILEP, return a type
  392. for the same kind of data as TYPE describes.
  393. Variants point to the "main variant" (which has neither CONST nor VOLATILE)
  394. via TYPE_MAIN_VARIANT, and it points to a chain of other variants
  395. so that duplicate variants are never made.
  396. Only main variants should ever appear as types of expressions. */
  397. extern tree build_type_variant ();
  398. /* Given a ..._TYPE node, calculate the TYPE_SIZE, TYPE_SIZE_UNIT,
  399. TYPE_ALIGN and TYPE_MODE fields.
  400. If called more than once on one node, does nothing except
  401. for the first time. */
  402. extern void layout_type ();
  403. /* Given a VAR_DECL, PARM_DECL, RESULT_DECL or FIELD_DECL node,
  404. calculates the DECL_SIZE, DECL_SIZE_UNIT, DECL_ALIGN and DECL_MODE
  405. fields. Call this only once for any given decl node.
  406. Second argument is the boundary that this field can be assumed to
  407. be starting at (in bits). Zero means it can be assumed aligned
  408. on any boundary that may be needed. */
  409. extern void layout_decl ();
  410. /* Fold constants as much as possible in an expression.
  411. Returns the simplified expression.
  412. Acts only on the top level of the expression;
  413. if the argument itself cannot be simplified, its
  414. subexpressions are not changed. */
  415. extern tree fold ();
  416. /* combine (tree_code, exp1, exp2) where EXP1 and EXP2 are constants
  417. returns a constant expression for the result of performing
  418. the operation specified by TREE_CODE on EXP1 and EXP2. */
  419. extern tree combine ();
  420. extern tree convert ();
  421. extern tree convert_units ();
  422. extern tree size_in_bytes ();
  423. /* Concatenate two lists (chains of TREE_LIST nodes) X and Y
  424. by making the last node in X point to Y.
  425. Returns X, except if X is 0 returns Y. */
  426. extern tree chainon ();
  427. /* Make a new TREE_LIST node from specified PURPOSE, VALUE and CHAIN. */
  428. extern tree tree_cons ();
  429. /* Return the last tree node in a chain. */
  430. extern tree tree_last ();
  431. /* Reverse the order of elements in a chain, and return the new head. */
  432. extern tree nreverse ();
  433. /* Returns the length of a chain of nodes
  434. (number of chain pointers to follow before reaching a null pointer). */
  435. extern int list_length ();
  436. /* integer_zerop (tree x) is nonzero if X is an integer constant of value 0 */
  437. extern int integer_zerop ();
  438. /* integer_onep (tree x) is nonzero if X is an integer constant of value 1 */
  439. extern int integer_onep ();
  440. /* integer_all_onesp (tree x) is nonzero if X is an integer constant
  441. all of whose significant bits are 1. */
  442. extern int integer_all_onesp ();
  443. /* type_unsigned_p (tree x) is nonzero if the type X is an unsigned type
  444. (all of its possible values are >= 0).
  445. If X is a pointer type, the value is 1.
  446. If X is a real type, the value is 0. */
  447. extern int type_unsigned_p ();
  448. /* staticp (tree x) is nonzero if X is a reference to data allocated
  449. at a fixed address in memory. */
  450. extern int staticp ();
  451. /* Gets an error if argument X is not an lvalue.
  452. Also returns 1 if X is an lvalue, 0 if not. */
  453. extern int lvalue_or_else ();
  454. /* save_expr (EXP, CTX) returns an expression equivalent to EXP
  455. but it can be used multiple times within context CTX
  456. and only evaluate EXP once. CTX should be a LET_STMT node. */
  457. extern tree save_expr ();
  458. /* stabilize_reference (EXP, CTX) returns an reference equivalent to EXP
  459. but it can be used multiple times within context CTX
  460. and only evaluate the subexpressions once.
  461. CTX should be a LET_STMT node. */
  462. extern tree stabilize_reference ();
  463. /* Return EXP, stripped of any conversions to wider types
  464. in such a way that the result of converting to type FOR_TYPE
  465. is the same as if EXP were converted to FOR_TYPE.
  466. If FOR_TYPE is 0, it signifies EXP's type. */
  467. extern tree get_unwidened ();
  468. /* Return OP or a simpler expression for a narrower value
  469. which can be sign-extended or zero-extended to give back OP.
  470. Store in *UNSIGNEDP_PTR either 1 if the value should be zero-extended
  471. or 0 if the value should be sign-extended. */
  472. extern tree get_narrower ();
  473. /* Given two integer or real types, return the type for their sum. */
  474. extern tree commontype ();
  475. /* Given PRECISION and UNSIGNEDP, return a suitable type-tree
  476. for an integer type with at least that precision.
  477. The definition of this resides in language-specific code
  478. as the repertoir of available types may vary. */
  479. extern tree type_for_size ();
  480. /* Given an integer type T, return a type like T but unsigned.
  481. If T is unsigned, the value is T. */
  482. extern tree unsigned_type ();
  483. /* Given an integer type T, return a type like T but signed.
  484. If T is signed, the value is T. */
  485. extern tree signed_type ();
  486. /* dump_tree (FILE, TREE)
  487. writes a description of TREE to stdio stream FILE, recursively
  488. describing all nodes that TREE points to.
  489. However, when describing a node of local duration,
  490. nodes of permanent duration reached from it are not mentioned.
  491. The idea is that all the permanent nodes are described at once. */
  492. extern void dump_tree ();
  493. /* An integer constant with value 0 */
  494. extern tree integer_zero_node;
  495. /* An integer constant with value 1 */
  496. extern tree integer_one_node;
  497. /* A constant of type pointer-to-int and value 0 */
  498. extern tree null_pointer_node;
  499. /* A node of type ERROR_MARK. */
  500. extern tree error_mark_node;
  501. /* The type node for the void type. */
  502. extern tree void_type_node;
  503. /* The type node for the ordinary (signed) integer type. */
  504. extern tree integer_type_node;
  505. /* The type node for the unsigned integer type. */
  506. extern tree unsigned_type_node;
  507. /* Points to the name of the input file from which the current input
  508. being parsed originally came (before it went into cpp). */
  509. extern char *input_filename;
  510. /* Nonzero for -pedantic switch: warn about anything
  511. that standard C forbids. */
  512. extern int pedantic;