Commit 1ff3c076 by Mark Mitchell Committed by Mark Mitchell

re PR c++/16518 (mutable specifier only applies to first item in declaration list)

	PR c++/16518
	PR c++/16337
	* decl.c (grokvardecl): Make declspecs parameter const.
	(grokdeclarator): Likewise.  Adjust accordingly.
	* decl.h (grokdeclarator): Adjust declaration.
	* parser.c (cp_parser_init_declarator): Do not clear
	decl_specifiers->attributes.

	PR c++/16518
	* g++.dg/parse/mutable1.C: New test.

From-SVN: r84646
parent 5549179f
2004-07-13 Mark Mitchell <mark@codesourcery.com>
PR c++/16518
PR c++/16337
* decl.c (grokvardecl): Make declspecs parameter const.
(grokdeclarator): Likewise. Adjust accordingly.
* decl.h (grokdeclarator): Adjust declaration.
* parser.c (cp_parser_init_declarator): Do not clear
decl_specifiers->attributes.
* cp-tree.h (lang_identifier): Remove class_value.
(IDENTIFIER_CLASS_VALUE): Remove.
(pop_class_decls): Likewise.
......
......@@ -32,7 +32,7 @@ enum decl_context
/* We need this in here to get the decl_context definition. */
extern tree grokdeclarator (const cp_declarator *,
cp_decl_specifier_seq *,
const cp_decl_specifier_seq *,
enum decl_context, int, tree*);
#ifdef DEBUG_CP_BINDING_LEVELS
......
......@@ -10477,7 +10477,6 @@ cp_parser_init_declarator (cp_parser* parser,
/* Gather the attributes that were provided with the
decl-specifiers. */
prefix_attributes = decl_specifiers->attributes;
decl_specifiers->attributes = NULL_TREE;
/* Assume that this is not the declarator for a function
definition. */
......
2004-07-13 Mark Mitchell <mark@codesourcery.com>
PR c++/16518
* g++.dg/parse/mutable1.C: New test.
2004-07-13 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/16443
......
// PR c++/16518
struct foo {
void bar() const { m1=1; m2=1;}
mutable int m1,m2;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment