This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Two trivial tweaks to -Wc++0x-compat


Douglas Gregor <doug.gregor@gmail.com> writes:

| Hello all,
| 
| These are two completely trivial patches to tweak the behavior of -Wc+
| +0x-compat. The first one turns off -Wc++0x-compat when the C++0x
| mode is enabled (e.g., via -std=c++0x). The second one makes -Werror=c
| ++0x-compat work.
| 
| Tested i386-apple-darwin8.8.1, no regressions.
| 
| Okay for mainline?

OK.

| 	Cheers,
| 	Doug
| 
| Index: c-opts.c
| ===================================================================
| --- c-opts.c    (revision 121562)
| +++ c-opts.c    (working copy)
| @@ -1082,6 +1082,11 @@ c_common_post_options (const char **pfil
|     if (flag_isoc99)
|       flag_complex_method = 2;
| +  /* If we're allowing C++0x constructs, don't warn about C++0x
| +     compatibility problems.  */
| +  if (flag_cpp0x)
| +    warn_cxx0x_compat = 0;
| +
|     if (flag_preprocess_only)
|       {
|         /* Open the output now.  We must do so even if flag_no_output is
| 
| 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
| 
| 	* c-opts.c (c_common_post_options): If C++0x mode is enabled, don't
| 	warn about C++0x compatibility.

A nit: The convention is to put the ChangeLog before the patch.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]