5 /* declaration of alloca */
9 #define strcasecmp stricmp
11 #define strcasecmp _stricmp
14 #define BYTES_BIG_ENDIAN 0
19 #ifndef GET_ENVIRONMENT
20 #define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0)
23 /* Define results of standard character escape sequences. */
24 #define TARGET_BELL 007
26 #define TARGET_TAB 011
27 #define TARGET_NEWLINE 012
31 #define TARGET_ESC 033
33 #define CHAR_TYPE_SIZE 8
34 #define WCHAR_TYPE_SIZE 32 /* ? maybe ? */
36 #define SUPPORTS_ONE_ONLY 0
38 #define TARGET_OBJECT_SUFFIX ".rel"
40 #ifndef WCHAR_UNSIGNED
41 #define WCHAR_UNSIGNED 0
47 struct diagnostic_context;
51 /* The first callback made to the front end, for simple
52 initialization needed before any calls to handle_option. Return
53 the language mask to filter the switch array with. */
54 unsigned int (*init_options) (unsigned int argc, const char **argv);
56 /* Handle the switch CODE, which has real type enum opt_code from
57 options.h. If the switch takes an argument, it is passed in ARG
58 which points to permanent storage. The handler is responsible for
59 checking whether ARG is NULL, which indicates that no argument
60 was in fact supplied. For -f and -W switches, VALUE is 1 or 0
61 for the positive and negative forms respectively.
63 Return 1 if the switch is valid, 0 if invalid, and -1 if it's
64 valid and should not be treated as language-independent too. */
65 int (*handle_option) (size_t code, const char *arg, int value);
67 /* Return false to use the default complaint about a missing
68 argument, otherwise output a complaint and return true. */
69 bool (*missing_argument) (const char *opt, size_t code);
71 /* Called when all command line options have been parsed to allow
72 further processing and initialization
74 Should return true to indicate that a compiler back-end is
75 not required, such as with the -E option.
77 If errorcount is nonzero after this call the compiler exits
78 immediately and the finish hook is not called. */
79 bool (*post_options) (const char **);
81 /* Called after post_options to initialize the front end. Return
82 false to indicate that no further compilation be performed, in
83 which case the finish hook is called immediately. */
86 /* Called at the end of compilation, as a finalizer. */
87 void (*finish) (void);
90 /* Each front end provides its own. */
91 extern const struct lang_hooks lang_hooks;
96 extern void internal_error (const char *, ...) ATTRIBUTE_PRINTF_1
98 /* Pass one of the OPT_W* from options.h as the first parameter. */
99 extern void warning (int, const char *, ...) ATTRIBUTE_PRINTF_2;
100 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
101 extern void fatal_error (const char *, ...) ATTRIBUTE_PRINTF_1
103 extern void inform (const char *, ...) ATTRIBUTE_PRINTF_1;
105 extern bool exit_after_options;
107 extern void print_version (FILE *, const char *);
109 /* Handle -d switch. */
110 extern void decode_d_option (const char *);
112 /* Functions used to get and set GCC's notion of in what directory
113 compilation was started. */
115 extern const char *get_src_pwd (void);
116 extern bool set_src_pwd (const char *);
121 /* Don't suppress warnings from system headers. -Wsystem-headers. */
123 extern bool warn_system_headers;
127 extern bool warnings_are_errors;
129 /* Nonzero for -pedantic switch: warn about anything
130 that standard C forbids. */
132 /* Temporarily suppress certain warnings.
133 This is set while reading code from a system header file. */
135 extern int in_system_header;
137 /* Nonzero means `char' should be signed. */
139 extern int flag_signed_char;
141 /* Nonzero means change certain warnings into errors.
142 Usually these are warnings about failure to conform to some standard. */
144 extern int flag_pedantic_errors;
152 /* Nonzero means don't output line number information. */
154 extern char flag_no_line_commands;
156 /* Nonzero causes -E output not to be done, but directives such as
157 #define that have side effects are still obeyed. */
159 extern char flag_no_output;
161 /* Nonzero means dump macros in some fashion; contains the 'D', 'M' or
162 'N' of the command line switch. */
164 extern char flag_dump_macros;
166 /* 0 means we want the preprocessor to not emit line directives for
167 the current working directory. 1 means we want it to do it. -1
168 means we should decide depending on whether debugging information
169 is being emitted or not. */
171 extern int flag_working_directory;
173 /* Nonzero means warn about usage of long long when `-pedantic'. */
175 extern int warn_long_long;
177 extern int sdcpp_common_handle_option (size_t code, const char *arg, int value);
178 extern bool sdcpp_common_missing_argument (const char *opt, size_t code);
179 extern unsigned int sdcpp_common_init_options (unsigned int, const char **);
180 extern bool sdcpp_common_post_options (const char **);
181 extern bool sdcpp_common_init (void);
182 extern void sdcpp_common_finish (void);
184 /* Nonzero means pass #include lines through to the output. */
186 extern char flag_dump_includes;
188 /* In c-ppoutput.c */
189 extern void init_pp_output (FILE *);
190 extern void preprocess_file (cpp_reader *);
191 extern void pp_file_change (const struct line_map *);
192 extern void pp_dir_change (cpp_reader *, const char *);
197 extern struct cpp_reader* parse_in;
202 extern struct line_maps line_table;
204 typedef source_location location_t; /* deprecated typedef */
206 /* Top-level source file. */
207 extern const char *main_input_filename;
212 /* Define the overall contents of a tree node.
213 just to make diagnostic.c happy */
223 #define DECL_SOURCE_LOCATION(NODE) ((NODE)->decl.locus)
228 extern int errorcount;
231 #endif /* __SDCPP_H */