From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30415 invoked by alias); 7 Jun 2007 19:59:56 -0000 Received: (qmail 30348 invoked by alias); 7 Jun 2007 19:59:45 -0000 Date: Thu, 07 Jun 2007 19:59:00 -0000 Message-ID: <20070607195945.30347.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/30759] [4.1/4.2/4.3 Regression] initializer-list accepted for object of non-POD type In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "simartin at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg00511.txt.bz2 ------- Comment #3 from simartin at gcc dot gnu dot org 2007-06-07 19:59 ------- Subject: Bug 30759 Author: simartin Date: Thu Jun 7 19:59:33 2007 New Revision: 125539 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125539 Log: gcc/ 2007-06-07 Simon Martin 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 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 PR c++/30759 * g++.dg/init/brace6.C: New test. Added: trunk/gcc/testsuite/g++.dg/init/brace6.C Modified: trunk/gcc/ChangeLog trunk/gcc/c-common.c trunk/gcc/c-common.h trunk/gcc/c-cppbuiltin.c trunk/gcc/c-opts.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/cp/decl.c trunk/gcc/cp/error.c trunk/gcc/cp/lex.c trunk/gcc/cp/parser.c trunk/gcc/cp/pt.c trunk/gcc/cp/typeck.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30759