c-opts.c (c_common_post_options): Also clear cpp_opts->cpp_warn_cxx11_compat.
* c-opts.c (c_common_post_options): Also clear cpp_opts->cpp_warn_cxx11_compat. From-SVN: r222978
This commit is contained in:
parent
129211bc88
commit
edff0c0662
|
@ -1,5 +1,8 @@
|
||||||
2015-05-09 Jason Merrill <jason@redhat.com>
|
2015-05-09 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* c-opts.c (c_common_post_options): Also clear
|
||||||
|
cpp_opts->cpp_warn_cxx11_compat.
|
||||||
|
|
||||||
* c-common.h (enum cxx_dialect): Add cxx_unset.
|
* c-common.h (enum cxx_dialect): Add cxx_unset.
|
||||||
* c-common.c (cxx_dialect): Initialize to cxx_unset.
|
* c-common.c (cxx_dialect): Initialize to cxx_unset.
|
||||||
* c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
|
* c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
|
||||||
|
|
|
@ -905,6 +905,7 @@ c_common_post_options (const char **pfilename)
|
||||||
/* If we're allowing C++0x constructs, don't warn about C++98
|
/* If we're allowing C++0x constructs, don't warn about C++98
|
||||||
identifiers which are keywords in C++0x. */
|
identifiers which are keywords in C++0x. */
|
||||||
warn_cxx11_compat = 0;
|
warn_cxx11_compat = 0;
|
||||||
|
cpp_opts->cpp_warn_cxx11_compat = 0;
|
||||||
|
|
||||||
if (warn_narrowing == -1)
|
if (warn_narrowing == -1)
|
||||||
warn_narrowing = 1;
|
warn_narrowing = 1;
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
// { dg-options "-Wall" }
|
||||||
|
// { dg-do compile { target c++11 } }
|
||||||
|
|
||||||
|
template <int> struct X {};
|
||||||
|
template <typename> struct Y { static int const c = 0; };
|
||||||
|
int main() { return Y<X<1>>::c; }
|
Loading…
Reference in New Issue