summaryrefslogtreecommitdiff
path: root/gcc/c-cppbuiltin.c
diff options
context:
space:
mode:
authorsimartin <simartin@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-07 19:59:33 +0000
committersimartin <simartin@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-07 19:59:33 +0000
commit6dcdb5def6dc92f06b25120cb0a5824a1b47630e (patch)
treec9bfce8481cc2ab5d947f7ccd7de24217b53132e /gcc/c-cppbuiltin.c
parent2419cc17d1e5b69c5392ef978bc21fdee764c737 (diff)
downloadgcc-6dcdb5def6dc92f06b25120cb0a5824a1b47630e.tar.gz
gcc/
2007-06-07 Simon Martin <simartin@users.sourceforge.net> PR c++/30759 * c-common.h (flag_cpp0x): Replaced by... (cxx_dialect): ... this new variable specifying the C++ dialect that is used. * c-common.c (flag_cpp0x): Removed. (cxx_dialect): Defined. * c-cppbuiltin.c (c_cpp_builtins): flag_cpp0x rewritten in terms of cxx_dialect. * c-opts.c (c_common_post_options): Likewise. (set_std_cxx98): Set cxx_dialect to cxx98. (set_std_cxx0x): Set cxx_dialect to cxx0x. gcc/cp/ 2007-06-07 Simon Martin <simartin@users.sourceforge.net> PR c++/30759 * decl.c (check_initializer): Report an error when a brace enclosed initializer is used for a non-aggregate type in C++98. (redeclaration_error_message): Rewrote flag_cpp0x in terms of cxx_dialect. (grokdeclarator): Likewise. (move_fn_p): Likewise. * typeck.c (check_return_expr): Likewise. * call.c (reference_binding): Likewise. * error.c (cp_cpp_error): Likewise. * pt.c (check_default_tmpl_args): Likewise. (tsubst): Likewise. * lex.c (init_reswords): Likewise. * parser.c (p_parser_primary_expression): Likewise. (TOKEN_PRECEDENCE): Likewise. (cp_parser_init_declarator): Likewise. (cp_parser_ptr_operator): Likewise. (cp_parser_parameter_declaration): Likewise. (cp_parser_enclosed_template_argument_list): Likewise. (cp_parser_skip_to_end_of_template_parameter_list): Likewise. (cp_parser_next_token_ends_template_argument_p): Likewise. gcc/testsuite/ 2007-06-07 Simon Martin <simartin@users.sourceforge.net> PR c++/30759 * g++.dg/init/brace6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125539 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-cppbuiltin.c')
-rw-r--r--gcc/c-cppbuiltin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c
index 1b52da02975..19bb47c1410 100644
--- a/gcc/c-cppbuiltin.c
+++ b/gcc/c-cppbuiltin.c
@@ -419,7 +419,7 @@ c_cpp_builtins (cpp_reader *pfile)
cpp_define (pfile, "__GXX_WEAK__=0");
if (warn_deprecated)
cpp_define (pfile, "__DEPRECATED");
- if (flag_cpp0x)
+ if (cxx_dialect == cxx0x)
cpp_define (pfile, "__GXX_EXPERIMENTAL_CXX0X__");
}
/* Note that we define this for C as well, so that we know if