diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-family/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-family/c.opt | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/warn_cxx0x4.C | 4 |
3 files changed, 9 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 57f83c9..17fb72f 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2015-05-08 Jason Merrill <jason@redhat.com> + + * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat. + 2015-05-08 Marek Polacek <polacek@redhat.com> PR c/64918 diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 3774a89..8f48d84 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -312,7 +312,7 @@ C ObjC Var(warn_cxx_compat) CPP(warn_cxx_operator_names) CppReason(CPP_W_CXX_OPE Warn about C constructs that are not in the common subset of C and C++ Wc++0x-compat -C++ ObjC++ Var(warn_cxx0x_compat) Warning LangEnabledBy(C++ ObjC++,Wall) +C++ ObjC++ Var(warn_cxx0x_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx11_compat) CppReason(CPP_W_CXX11_COMPAT) Deprecated in favor of -Wc++11-compat Wc++11-compat diff --git a/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x4.C b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x4.C new file mode 100644 index 0000000..c3f0cf5 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x4.C @@ -0,0 +1,4 @@ +// { dg-options "-Wall" } + +#define FOO "foo" +const char *p = "bar"FOO; // { dg-warning "macro" } |