diff options
author | Jason Merrill <jason@redhat.com> | 2012-03-21 01:09:41 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-03-21 01:09:41 -0400 |
commit | 552b8185be26149ffcc8c879f4644d52aa1c85a8 (patch) | |
tree | 9106f53126560094c079914853af9d31398a04a7 /gcc/cp | |
parent | c19267cbaf0188acd862e628b72fb32e68d08d48 (diff) | |
download | gcc-552b8185be26149ffcc8c879f4644d52aa1c85a8.zip gcc-552b8185be26149ffcc8c879f4644d52aa1c85a8.tar.gz gcc-552b8185be26149ffcc8c879f4644d52aa1c85a8.tar.bz2 |
c-common.h (enum cxx_dialect): Add cxx1y.
* c-common.h (enum cxx_dialect): Add cxx1y.
* c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
test.
* c-cppbuiltin.c (c_cpp_builtins): Likewise.
* c-opts.c (c_common_post_options): Likewise.
(set_std_cxx1y): New.
(c_common_handle_option): Call it.
* c.opt (-std=c++1y, -std=gnu++1y): New flags.
cp/
* lex.c (init_reswords): Use >= for cxx_dialect test.
* parser.c (cp_parser_exception_specification_opt): Likewise.
testsuite/
* lib/target-supports.exp: Add { target c++1y }.
From-SVN: r185596
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/lex.c | 2 | ||||
-rw-r--r-- | gcc/cp/parser.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8dcc4462..370fd7a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2012-03-20 Jason Merrill <jason@redhat.com> + * lex.c (init_reswords): Use >= for cxx_dialect test. + * parser.c (cp_parser_exception_specification_opt): Likewise. + * mangle.c (write_type): Handle 'auto'. * init.c (build_new): Don't do auto deduction where it might affect template mangling. diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index c11e3b3..a79448e 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -174,7 +174,7 @@ init_reswords (void) tree id; int mask = 0; - if (cxx_dialect != cxx0x) + if (cxx_dialect < cxx0x) mask |= D_CXX0X; if (flag_no_asm) mask |= D_ASM | D_EXT; diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index b3c87a8..75b7bdb 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -19594,7 +19594,7 @@ cp_parser_exception_specification_opt (cp_parser* parser) #if 0 /* Enable this once a lot of code has transitioned to noexcept? */ - if (cxx_dialect == cxx0x && !in_system_header) + if (cxx_dialect >= cxx0x && !in_system_header) warning (OPT_Wdeprecated, "dynamic exception specifications are " "deprecated in C++0x; use %<noexcept%> instead"); #endif |