FreeBSD/contrib/gcc/c-opts.c
/* These settings are appropriate for GCC, but not necessarily so for
   cpplib as a library.  */
These settings are appropriate for GCC, but not necessarily so for
cpplib as a library.
These settings are appropriate for GCC but not necessarily so for cpplib as a library .
static void
sanitize_cpp_opts (void)
{
  if (deps_seen && cpp_opts->deps.style == DEPS_NONE)
    error ("to generate dependencies you must specify either -M or -MM");
  if (flag_dump_macros == 'M')
    flag_no_output = 1;
  if (cpp_opts->directives_only && !cpp_opts->preprocessed && !flag_dump_macros)
    flag_dump_macros = 'D';
  if (flag_no_output)
    {
      if (flag_dump_macros != 'M')
	flag_dump_macros = 0;
      flag_dump_includes = 0;
      flag_no_line_commands = 1;
    }
  cpp_opts->unsigned_char = !flag_signed_char;
  cpp_opts->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS;
  cpp_opts->warn_long_long
    = warn_long_long && ((!flag_isoc99 && pedantic) || warn_traditional);
  cpp_opts->warn_variadic_macros
    = warn_variadic_macros && (pedantic || warn_traditional);
  if (flag_working_directory == -1)
    flag_working_directory = (debug_info_level != DINFO_LEVEL_NONE);
  if (cpp_opts->directives_only)
    {
      if (warn_unused_macros)
	error ("-fdirectives-only is incompatible with -Wunused_macros");
      if (cpp_opts->traditional)
	error ("-fdirectives-only is incompatible with -traditional");
    }
}
static void sanitize_cpp_opts ( void ) { if ( deps_seen && cpp_opts -> deps . style == DEPS_NONE ) error ( " " ) ; if ( flag_dump_macros == ' ' ) flag_no_output = 1 ; if ( cpp_opts -> directives_only && ! cpp_opts -> preprocessed && ! flag_dump_macros ) flag_dump_macros = ' ' ; if ( flag_no_output ) { if ( flag_dump_macros != ' ' ) flag_dump_macros = 0 ; flag_dump_includes = 0 ; flag_no_line_commands = 1 ; } cpp_opts -> unsigned_char = ! flag_signed_char ; cpp_opts -> stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS ; cpp_opts -> warn_long_long = warn_long_long && ( ( ! flag_isoc99 && pedantic ) || warn_traditional ) ; cpp_opts -> warn_variadic_macros = warn_variadic_macros && ( pedantic || warn_traditional ) ; if ( flag_working_directory == -1 ) flag_working_directory = ( debug_info_level != DINFO_LEVEL_NONE ) ; if ( cpp_opts -> directives_only ) { if ( warn_unused_macros ) error ( " " ) ; if ( cpp_opts -> traditional ) error ( " " ) ; } }
These settings are appropriate for GCC, but not necessarily so for
cpplib as a library.
These settings are appropriate for GCC but not necessarily so for cpplib as a library .
/* If we don't know what style of dependencies to output, complain
     if any other dependency switches have been given.  */ /* -dM and dependencies suppress normal output; do it here so that
     the last -d[MDN] switch overrides earlier ones.  */ /* By default, -fdirectives-only implies -dD.  This allows subsequent phases
     to perform proper macro expansion.  */ /* Disable -dD, -dN and -dI if normal output is suppressed.  Allow
     -dM since at least glibc relies on -M -dM to work.  */ /* Also, flag_no_output implies flag_no_line_commands, always.  */ /* We want -Wno-long-long to override -pedantic -std=non-c99
     and/or -Wtraditional, whatever the ordering.  */ /* Similarly with -Wno-variadic-macros.  No check for c99 here, since
     this also turns off warnings about GCCs extension.  */ /* If we're generating preprocessor output, emit current directory
     if explicitly requested or if debugging information is enabled.
     ??? Maybe we should only do it for debugging formats that
     actually output the current directory?  */