X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fc-opts.c;h=eda0f48f9496e2d1434685f4844bc9830c21477f;hb=d37446aa31ac9074242fa8b45d2cd48082a1714c;hp=4cb76872be3f98e63ea0f49011cf4581c3e65b84;hpb=a54ab3301add6ff86ab26d16ae784338a10da35f;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 4cb76872be3..eda0f48f949 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1,5 +1,5 @@ /* C/ObjC/C++ command line option handling. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Neil Booth. @@ -407,6 +407,7 @@ c_common_handle_option (size_t scode, const char *arg, int value) if (warn_strict_overflow == -1) warn_strict_overflow = value; warn_array_bounds = value; + warn_volatile_register_var = value; /* Only warn about unknown pragmas that are not in system headers. */ @@ -1106,18 +1107,6 @@ c_common_post_options (const char **pfilename) /* Adjust various flags for C++ based on command-line settings. */ if (c_dialect_cxx ()) { - if (!flag_permissive) - { - flag_pedantic_errors = 1; - /* FIXME: For consistency pedantic_errors should have the - same value in the front-end and in CPP. However, this - will break existing applications. The right fix is - disentagle flag_permissive from flag_pedantic_errors, - create a new diagnostic function permerror that is - controlled by flag_permissive and convert most C++ - pedwarns to this new function. - cpp_opts->pedantic_errors = 1; */ - } if (!flag_no_inline) { flag_inline_trees = 1; @@ -1238,6 +1227,9 @@ c_common_init (void) if (version_flag) c_common_print_pch_checksum (stderr); + /* Has to wait until now so that cpplib has its hash table. */ + init_pragma (); + if (flag_preprocess_only) { finish_options (); @@ -1245,9 +1237,6 @@ c_common_init (void) return false; } - /* Has to wait until now so that cpplib has its hash table. */ - init_pragma (); - return true; } @@ -1438,6 +1427,8 @@ sanitize_cpp_opts (void) flag_dump_includes = 0; flag_no_line_commands = 1; } + else if (cpp_opts->deps.missing_files) + error ("-MG may only be used with -M or -MM"); cpp_opts->unsigned_char = !flag_signed_char; cpp_opts->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS; @@ -1679,6 +1670,7 @@ handle_OPT_d (const char *arg) case 'M': /* Dump macros only. */ case 'N': /* Dump names. */ case 'D': /* Dump definitions. */ + case 'U': /* Dump used macros. */ flag_dump_macros = c; break;