osprey/kg++fe/gnu/c-opts.c File Reference

#include "config.h"
#include "system.h"
#include "tree.h"
#include "c-common.h"
#include "c-pragma.h"
#include "flags.h"
#include "toplev.h"
#include "langhooks.h"
#include "tree-inline.h"
#include "diagnostic.h"
#include "intl.h"

Include dependency graph for c-opts.c:

Go to the source code of this file.

Data Types

type  cl_option
type  deferred_opt

Defines

#define STDC_0_IN_SYSTEM_HEADERS   0
#define CL_C_ONLY   (1 << 0)
#define CL_OBJC_ONLY   (1 << 1)
#define CL_CXX_ONLY   (1 << 2)
#define CL_OBJCXX_ONLY   (1 << 3)
#define CL_JOINED   (1 << 4)
#define CL_SEPARATE   (1 << 5)
#define CL_ARG   (CL_JOINED | CL_SEPARATE)
#define CL_C   (CL_C_ONLY | CL_OBJC_ONLY)
#define CL_OBJC   (CL_OBJC_ONLY | CL_OBJCXX_ONLY)
#define CL_CXX   (CL_CXX_ONLY | CL_OBJCXX_ONLY)
#define CL_ALL   (CL_C | CL_CXX)
#define COMMAND_LINE_OPTIONS
#define OPT(text, flags, code)   code,
#define OPT(text, flags, code)   { text, sizeof(text) - 1, flags, code },

Enumerations

enum  opt_code { N_OPTS, N_OPTS }

Functions/Subroutines

static void missing_arg PARAMS ((size_t))
static size_t find_opt PARAMS ((const char *, int))
static void set_Wimplicit PARAMS ((int))
static void complain_wrong_lang PARAMS ((size_t, int))
static void write_langs PARAMS ((char *, int))
static void print_help PARAMS ((void))
static void handle_OPT_d PARAMS ((const char *))
static void set_std_c89 PARAMS ((int, int))
static void defer_opt PARAMS ((enum opt_code, const char *))
static void missing_arg (size_t opt_index)
static size_t find_opt (char *input, int lang_flag) const
static void defer_opt (enum opt_code code, const char *arg)
void c_common_init_options (enum c_language_kind lang)
int c_common_decode_option (int argc, char **argv)
bool c_common_post_options ()
static void preprocess_file ()
const char * c_common_init (char *filename) const
void c_common_finish ()
static void check_deps_environment_vars ()
static void handle_deferred_opts ()
static void sanitize_cpp_opts ()
static void set_std_c89 (int c94, int iso)
static void set_std_c99 (int iso)
static void set_std_cxx98 (int iso)
static void set_Wimplicit (int on)
static void handle_OPT_d (char *arg) const
static void write_langs (char *buf, int flags)
static void complain_wrong_lang (size_t opt_index, int on)
static void print_help ()

Variables

static cpp_optionscpp_opts
static const char * in_fname
static const char * out_fname
static FILEout_stream
static bool deps_append
static bool deps_seen
static const char * deps_file
static size_t deferred_count
static size_t deferred_size
static struct cl_option cl_options []
static struct deferred_optdeferred_opts


Define Documentation

#define CL_ALL   (CL_C | CL_CXX)

Definition at line 86 of file c-opts.c.

#define CL_ARG   (CL_JOINED | CL_SEPARATE)

Definition at line 82 of file c-opts.c.

Referenced by c_common_decode_option().

#define CL_C   (CL_C_ONLY | CL_OBJC_ONLY)

Definition at line 83 of file c-opts.c.

Referenced by c_common_decode_option(), c_common_handle_option(), and c_common_init_options().

#define CL_C_ONLY   (1 << 0)

Definition at line 75 of file c-opts.c.

Referenced by c_common_decode_option(), and write_langs().

#define CL_CXX   (CL_CXX_ONLY | CL_OBJCXX_ONLY)

Definition at line 85 of file c-opts.c.

Referenced by c_common_decode_option(), c_common_handle_option(), and c_common_init_options().

#define CL_CXX_ONLY   (1 << 2)

Definition at line 77 of file c-opts.c.

Referenced by c_common_decode_option(), and write_langs().

#define CL_JOINED   (1 << 4)

Definition at line 79 of file c-opts.c.

Referenced by c_common_decode_option(), find_opt(), handle_option(), and prune_options().

#define CL_OBJC   (CL_OBJC_ONLY | CL_OBJCXX_ONLY)

Definition at line 84 of file c-opts.c.

#define CL_OBJC_ONLY   (1 << 1)

Definition at line 76 of file c-opts.c.

Referenced by write_langs().

#define CL_OBJCXX_ONLY   (1 << 3)

Definition at line 78 of file c-opts.c.

#define CL_SEPARATE   (1 << 5)

Definition at line 80 of file c-opts.c.

Referenced by c_common_decode_option(), and handle_option().

#define COMMAND_LINE_OPTIONS

Definition at line 111 of file c-opts.c.

#define OPT ( text,
flags,
code   )     { text, sizeof(text) - 1, flags, code },

Definition at line 303 of file c-opts.c.

#define OPT ( text,
flags,
code   )     code,

Definition at line 303 of file c-opts.c.

Referenced by print_instruction().

#define STDC_0_IN_SYSTEM_HEADERS   0

Definition at line 72 of file c-opts.c.

Referenced by sanitize_cpp_opts().


Enumeration Type Documentation

enum opt_code

Enumerator:
N_OPTS 
N_OPTS 

Definition at line 288 of file c-opts.c.


Function Documentation

int c_common_decode_option ( int  argc,
char **  argv 
)

Definition at line 528 of file c-opts.c.

References atoi(), c_language, CL_ARG, CL_C, CL_C_ONLY, CL_CXX, CL_CXX_ONLY, CL_JOINED, cl_options, CL_SEPARATE, CLK_ASM, clk_c, clk_cplusplus, complain_wrong_lang(), constant_string_class_name, cp_deprecated, cpp_set_lang(), defer_opt(), cpp_options::deps, deps_file, deps_seen, DEPS_SYSTEM, DEPS_USER, disable_builtin_function(), cpp_options::discard_comments, cpp_options::discard_comments_in_macro_exp, dollars_in_ident, dump_switch_p(), dup(), error(), explicit_flag_signed_bitfields, find_opt(), flag_abi_version, flag_access_control, flag_alt_external_templates, flag_check_new, flag_cond_mismatch, flag_conserve_space, flag_const_strings, flag_default_inline, flag_detailed_statistics, flag_elide_constructors, flag_enforce_eh_specs, flag_exceptions, flag_external_templates, flag_gen_declaration, flag_hosted, flag_implement_inlines, flag_implicit_inline_templates, flag_implicit_templates, flag_ms_extensions, flag_new_for_scope, flag_next_runtime, flag_no_asm, flag_no_builtin, flag_no_gnu_keywords, flag_no_nonansi_builtin, flag_objc, flag_optional_diags, flag_permissive, flag_preprocess_only, flag_rtti, flag_short_double, flag_short_enums, flag_short_wchar, flag_signed_bitfields, flag_signed_char, flag_undef, flag_use_cxa_atexit, flag_use_repository, flag_vtable_gc, flag_weak, cl_option::flags, free(), handle_OPT_d(), in_fname, cpp_options::inhibit_warnings, len, max_tinst_depth, memcpy, mesg_implicit_function_declaration, missing_arg(), cpp_options::missing_files, N_OPTS, cpp_options::no_line_commands, cpp_options::no_output, cpp_options::no_standard_cplusplus_includes, cpp_options::no_standard_includes, cpp_options::objc, cpp_options::operator_names, opt, cl_option::opt_len, OPT_M, OPT_MD, OPT_MG, OPT_MM, OPT_MMD, out_fname, parse_in, cpp_options::pedantic, cpp_options::pedantic_errors, cpp_options::phony_targets, cpp_options::preprocessed, print_help, cpp_options::print_include_names, print_struct_values, progname, read_integral_parameter(), cpp_options::remap, result, set_std_c89(), set_std_c99(), set_std_cxx98(), set_Wformat(), set_Wimplicit(), set_Wunused(), cpp_options::show_column, strlen(), strtol(), cpp_options::style, cpp_options::tabstop, cpp_options::traditional, cpp_options::trigraphs, cpp_options::verbose, warn_abi, warn_bad_function_cast, warn_cast_qual, warn_char_subscripts, cpp_options::warn_comments, warn_conversion, warn_ctor_dtor_privacy, warn_declaration_after_statement, cpp_options::warn_deprecated, warn_deprecated, warn_div_by_zero, warn_ecpp, cpp_options::warn_endif_labels, warn_float_equal, warn_format_extra_args, warn_format_nonliteral, warn_format_security, warn_format_y2k, warn_format_zero_length, warn_implicit_int, cpp_options::warn_import, warn_long_long, warn_main, warn_missing_braces, warn_missing_declarations, warn_missing_format_attribute, warn_missing_prototypes, cpp_options::warn_multichar, warn_nested_externs, warn_nonnull, warn_nontemplate_friend, warn_nonvdtor, cpp_options::warn_num_sign_change, warn_old_style_cast, warn_overloaded_virtual, warn_parentheses, warn_pmf2ptr, warn_pointer_arith, warn_protocol, warn_redundant_decls, warn_reorder, warn_return_type, warn_selector, warn_sequence_point, warn_sign_compare, warn_sign_promo, warn_strict_aliasing, warn_strict_prototypes, warn_switch, warn_synth, cpp_options::warn_system_headers, warn_traditional, cpp_options::warn_traditional, cpp_options::warn_trigraphs, warn_undeclared_selector, cpp_options::warn_undef, warn_uninitialized, warn_unknown_pragmas, cpp_options::warn_unused_macros, warn_write_strings, warning, cpp_options::warnings_are_errors, and xmalloc().

void c_common_finish ( void   ) 

Definition at line 1467 of file c-opts.c.

Referenced by cxx_finish().

const char* c_common_init ( char *  filename  )  const

void c_common_init_options ( enum c_language_kind  lang  ) 

bool c_common_post_options (  ) 

static void check_deps_environment_vars ( void   )  [static]

static void complain_wrong_lang ( size_t  opt_index,
int  on 
) [static]

Definition at line 1713 of file c-opts.c.

References cl_options, cl_option::flags, cl_option::opt_text, warning, and write_langs().

Referenced by c_common_decode_option(), and handle_option().

static void defer_opt ( enum opt_code  code,
const char *  arg 
) [static]

static size_t find_opt ( char *  input,
int  lang_flag 
) const [static]

static void handle_deferred_opts ( void   )  [static]

Definition at line 1543 of file c-opts.c.

References abort, deferred_opt::arg, deferred_opt::code, deferred_count, deferred_opts, free(), i, opt, and parse_in.

Referenced by c_common_post_options().

static void handle_OPT_d ( char *  arg  )  const [static]

static void missing_arg ( size_t  opt_index  )  [static]

Definition at line 341 of file c-opts.c.

References cl_options, error(), OPT_MD, OPT_MMD, and cl_option::opt_text.

Referenced by c_common_decode_option().

static void defer_opt PARAMS ( (enum opt_code, const char *)   )  [static]

static void set_std_c89 PARAMS ( (int, int)   )  [static]

static void handle_OPT_d PARAMS ( (const char *)   )  [static]

Definition at line 635 of file mips-tfile.c.

static void print_help PARAMS ( (void  )  [static, read]

Definition at line 77 of file cplus-dem.c.

static void write_langs PARAMS ( (char *, int)   )  [static]

static void complain_wrong_lang PARAMS ( (size_t, int)   )  [static]

static void set_Wimplicit PARAMS ( (int)   )  [static]

static size_t find_opt PARAMS ( (const char *, int)   )  [static]

static void missing_arg PARAMS ( (size_t  )  [static]

static void preprocess_file (  )  [static]

Definition at line 1415 of file c-opts.c.

References cpp_preprocess_file(), fopen, in_fname, NULL, out_fname, out_stream, and parse_in.

Referenced by c_common_init().

static void print_help ( void   )  [static]

Definition at line 1729 of file c-opts.c.

References _, and fputs().

static void sanitize_cpp_opts ( void   )  [static]

static void set_std_c89 ( int  c94,
int  iso 
) [static]

static void set_std_c99 ( int  iso  )  [static]

static void set_std_cxx98 ( int  iso  )  [static]

static void set_Wimplicit ( int  on  )  [static]

static void write_langs ( char *  buf,
int  flags 
) [static]

Definition at line 1690 of file c-opts.c.

References CL_C_ONLY, CL_CXX_ONLY, CL_OBJC_ONLY, and strcat().

Referenced by complain_wrong_lang().


Variable Documentation

cpp_options* cpp_opts [static]

Definition at line 35 of file c-opts.c.

Referenced by register_include_chains().

Definition at line 54 of file c-opts.c.

Referenced by defer_opt().

bool deps_append [static]

const char* deps_file [static]

bool deps_seen [static]

const char* in_fname [static]

const char* out_fname [static]

FILE* out_stream [static]

Definition at line 42 of file c-opts.c.

Referenced by c_common_finish(), c_common_post_options(), and preprocess_file().


Generated on Wed Apr 8 15:12:58 2009 for Open64 by  doxygen 1.5.6