* c-common.c (attribute_takes_identifier_p): New fn.
* c-common.h: Declare it.
cp/
* parser.c (cp_parser_parenthesized_expression_list): Change
is_attribute_list parm to int to indicate whether or not to
handle initial identifier specially.
(cp_parser_attribute_list): Use attribute_takes_identifier_p.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158355
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-04-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/36625
+ * c-common.c (attribute_takes_identifier_p): New fn.
+ * c-common.h: Declare it.
+
2010-04-14 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*divmod<mode>4): Remove stray "&&" from
identifier as an argument, so the front end shouldn't look it up. */
bool
-attribute_takes_identifier_p (const_tree attr_id)
+attribute_takes_identifier_p (tree attr_id)
{
- if (is_attribute_p ("mode", attr_id)
- || is_attribute_p ("format", attr_id)
- || is_attribute_p ("cleanup", attr_id))
- return true;
- else
- return targetm.attribute_takes_identifier_p (attr_id);
+ return (is_attribute_p ("mode", attr_id)
+ || is_attribute_p ("format", attr_id)
+ || is_attribute_p ("cleanup", attr_id));
}
/* Attribute handlers common to C front ends. */
extern void set_Wformat (int);
extern tree handle_format_attribute (tree *, tree, tree, int, bool *);
extern tree handle_format_arg_attribute (tree *, tree, tree, int, bool *);
-extern bool attribute_takes_identifier_p (const_tree);
-extern int c_common_handle_option (size_t code, const char *arg, int value, int kind);
+extern bool attribute_takes_identifier_p (tree);
+extern int c_common_handle_option (size_t code, const char *arg, int value);
extern bool c_common_missing_argument (const char *opt, size_t code);
extern tree c_common_type_for_mode (enum machine_mode, int);
extern tree c_common_type_for_size (unsigned int, int);
+2010-04-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/36625
+ * parser.c (cp_parser_parenthesized_expression_list): Change
+ is_attribute_list parm to int to indicate whether or not to
+ handle initial identifier specially.
+ (cp_parser_attribute_list): Use attribute_takes_identifier_p.
+
2010-04-13 Jason Merrill <jason@redhat.com>
* call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
+2010-04-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/36625
+ * g++.dg/ext/attrib38.C: New.
+
2010-04-14 Steve Ellcey <sje@cup.hp.com>
PR testsuite/43739