/* Number of deferred options scanned for -include. */
static size_t include_cursor;
-/* Permit Fortran front-end options. */
-static bool permit_fortran_options;
-
static void set_Wimplicit (int);
static void handle_OPT_d (const char *);
static void set_std_cxx98 (int);
/* Common initialization before parsing options. */
unsigned int
-c_common_init_options (unsigned int argc, const char ** ARG_UNUSED (argv))
+c_common_init_options (unsigned int argc, const char **argv)
{
static const unsigned int lang_flags[] = {CL_C, CL_ObjC, CL_CXX, CL_ObjCXX};
- unsigned int result;
+ unsigned int i, result;
/* This is conditionalized only because that is the way the front
ends used to do it. Maybe this should be unconditional? */
result = lang_flags[c_language];
- /* If potentially preprocessing Fortran we have to accept its front
- end options since the driver passes most of them through. */
-#ifdef CL_F77
- if (c_language == clk_c && argc > 2
- && !strcmp (argv[2], "-traditional-cpp" ))
+ if (c_language == clk_c)
{
- permit_fortran_options = true;
- result |= CL_F77;
+ /* If preprocessing assembly language, accept any of the C-family
+ front end options since the driver may pass them through. */
+ for (i = 1; i < argc; i++)
+ if (! strcmp (argv[i], "-lang-asm"))
+ {
+ result |= CL_C | CL_ObjC | CL_CXX | CL_ObjCXX;
+ break;
+ }
}
-#endif
return result;
}
default:
if (cl_options[code].flags & (CL_C | CL_CXX | CL_ObjC | CL_ObjCXX))
break;
- result = permit_fortran_options;
+ result = 0;
break;
case OPT__output_pch_:
cpp_opts->warn_unused_macros = warn_unused_macros;
/* Restore the line map from <command line>. */
if (!cpp_opts->preprocessed)
- cpp_change_file (parse_in, LC_RENAME, main_input_filename);
+ cpp_change_file (parse_in, LC_RENAME, this_input_filename);
/* Set this here so the client can change the option if it wishes,
and after stacking the main file so we don't trace the main file. */