X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fc-opts.c;h=62db668b4e12f02f0fd001ad72c54e09667db1b2;hb=857dd6a4fa24bd5f15495035a49857a19ce662d4;hp=62fec1a124a1cc56a3280d441547f6afa6010e44;hpb=f1035767ba452ca6194865236191ee619215c88c;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 62fec1a124a..62db668b4e1 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -16,8 +16,8 @@ for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ #include "config.h" #include "system.h" @@ -70,6 +70,9 @@ static bool deps_seen; /* If -v seen. */ static bool verbose; +/* If -lang-fortran seen. */ +static bool lang_fortran = false; + /* Dependency output file. */ static const char *deps_file; @@ -237,6 +240,15 @@ c_common_init_options (unsigned int argc, const char **argv) result |= CL_C | CL_ObjC | CL_CXX | CL_ObjCXX; break; } + +#ifdef CL_Fortran + for (i = 1; i < argc; i++) + if (! strcmp (argv[i], "-lang-fortran")) + { + result |= CL_Fortran; + break; + } +#endif } return result; @@ -258,6 +270,10 @@ c_common_handle_option (size_t scode, const char *arg, int value) default: if (cl_options[code].flags & (CL_C | CL_CXX | CL_ObjC | CL_ObjCXX)) break; +#ifdef CL_Fortran + if (lang_fortran && (cl_options[code].flags & (CL_Fortran))) + break; +#endif result = 0; break; @@ -647,11 +663,8 @@ c_common_handle_option (size_t scode, const char *arg, int value) flag_enforce_eh_specs = value; break; - case OPT_ffixed_form: - case OPT_ffixed_line_length_: - /* Fortran front end options ignored when preprocessing only. */ - if (!flag_preprocess_only) - result = 0; + case OPT_fextended_identifiers: + cpp_opts->extended_identifiers = value; break; case OPT_ffor_scope: @@ -829,6 +842,10 @@ c_common_handle_option (size_t scode, const char *arg, int value) cpp_opts->dollars_in_ident = false; break; + case OPT_lang_fortran: + lang_fortran = true; + break; + case OPT_lang_objc: cpp_opts->objc = 1; break; @@ -979,18 +996,19 @@ c_common_post_options (const char **pfilename) /* Special format checking options don't work without -Wformat; warn if they are used. */ - if (warn_format_y2k && !warn_format) - warning (0, "-Wformat-y2k ignored without -Wformat"); - if (warn_format_extra_args && !warn_format) - warning (0, "-Wformat-extra-args ignored without -Wformat"); - if (warn_format_zero_length && !warn_format) - warning (0, "-Wformat-zero-length ignored without -Wformat"); - if (warn_format_nonliteral && !warn_format) - warning (0, "-Wformat-nonliteral ignored without -Wformat"); - if (warn_format_security && !warn_format) - warning (0, "-Wformat-security ignored without -Wformat"); - if (warn_missing_format_attribute && !warn_format) - warning (0, "-Wmissing-format-attribute ignored without -Wformat"); + if (!warn_format) + { + warning (OPT_Wformat_y2k, + "-Wformat-y2k ignored without -Wformat"); + warning (OPT_Wformat_extra_args, + "-Wformat-extra-args ignored without -Wformat"); + warning (OPT_Wformat_zero_length, + "-Wformat-zero-length ignored without -Wformat"); + warning (OPT_Wformat_nonliteral, + "-Wformat-nonliteral ignored without -Wformat"); + warning (OPT_Wformat_security, + "-Wformat-security ignored without -Wformat"); + } /* C99 requires special handling of complex multiplication and division; -ffast-math and -fcx-limited-range are handled in process_options. */