/* 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.
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. */
/* 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;
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 ();
return false;
}
- /* Has to wait until now so that cpplib has its hash table. */
- init_pragma ();
-
return true;
}
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;
case 'M': /* Dump macros only. */
case 'N': /* Dump names. */
case 'D': /* Dump definitions. */
+ case 'U': /* Dump used macros. */
flag_dump_macros = c;
break;