1 /* Language-specific hook definitions for C front end.
2 Copyright (C) 1991, 1995, 1997, 1998 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
30 /* Each of the functions defined here
31 is an alternative to a function in objc-actions.c. */
34 lang_decode_option (p)
37 return c_decode_option (p);
44 /* the beginning of the file is a new line; check for # */
45 /* With luck, we discover the real source file's name from that
46 and put it in input_filename. */
47 ungetc (check_newline (), finput);
63 print_lang_statistics ()
67 /* used by print-tree.c */
70 lang_print_xnode (file, node, indent)
71 FILE *file ATTRIBUTE_UNUSED;
72 tree node ATTRIBUTE_UNUSED;
73 int indent ATTRIBUTE_UNUSED;
77 /* Used by c-lex.c, but only for objc. */
80 lookup_interface (arg)
81 tree arg ATTRIBUTE_UNUSED;
88 tree arg ATTRIBUTE_UNUSED;
94 maybe_objc_check_decl (decl)
95 tree decl ATTRIBUTE_UNUSED;
100 maybe_objc_comptypes (lhs, rhs, reflexive)
101 tree lhs ATTRIBUTE_UNUSED;
102 tree rhs ATTRIBUTE_UNUSED;
103 int reflexive ATTRIBUTE_UNUSED;
109 maybe_objc_method_name (decl)
110 tree decl ATTRIBUTE_UNUSED;
116 maybe_building_objc_message_expr ()
122 recognize_objc_keyword ()
128 build_objc_string (len, str)
129 int len ATTRIBUTE_UNUSED;
130 char *str ATTRIBUTE_UNUSED;
139 fatal ("GCC does not yet support XREF");
145 fatal ("GCC does not yet support XREF");
148 /* Called at end of parsing, but before end-of-file processing. */
153 #ifndef ASM_OUTPUT_CONSTRUCTOR
154 extern tree static_ctors;
156 #ifndef ASM_OUTPUT_DESTRUCTOR
157 extern tree static_dtors;
159 extern tree build_function_call PROTO((tree, tree));
160 #if !defined(ASM_OUTPUT_CONSTRUCTOR) || !defined(ASM_OUTPUT_DESTRUCTOR)
161 tree void_list_node = build_tree_list (NULL_TREE, void_type_node);
163 #ifndef ASM_OUTPUT_CONSTRUCTOR
166 tree fnname = get_file_function_name ('I');
167 start_function (void_list_node,
168 build_parse_node (CALL_EXPR, fnname, void_list_node,
170 NULL_TREE, NULL_TREE, 0);
171 fnname = DECL_ASSEMBLER_NAME (current_function_decl);
174 for (; static_ctors; static_ctors = TREE_CHAIN (static_ctors))
175 expand_expr_stmt (build_function_call (TREE_VALUE (static_ctors),
180 assemble_constructor (IDENTIFIER_POINTER (fnname));
183 #ifndef ASM_OUTPUT_DESTRUCTOR
186 tree fnname = get_file_function_name ('D');
187 start_function (void_list_node,
188 build_parse_node (CALL_EXPR, fnname, void_list_node,
190 NULL_TREE, NULL_TREE, 0);
191 fnname = DECL_ASSEMBLER_NAME (current_function_decl);
194 for (; static_dtors; static_dtors = TREE_CHAIN (static_dtors))
195 expand_expr_stmt (build_function_call (TREE_VALUE (static_dtors),
200 assemble_destructor (IDENTIFIER_POINTER (fnname));