From 8dd00781e17a65c4344681e13f763f8b41880c61 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 4 Aug 2011 09:40:24 +0200 Subject: re PR middle-end/49905 (Better sanity checking on sprintf src & dest to produce warning for dodgy code ?) PR middle-end/49905 * tree.h (init_attributes): New prototype. * attribs.c (init_attributes): No longer static. * decl.c (cxx_init_decl_processing): Add alloc_size (1) attribute for operator new and operator new []. Call init_attributes. * g++.dg/ext/builtin-object-size3.C: New test. From-SVN: r177316 --- gcc/tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 6b13a2a..367c7b9 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5547,6 +5547,8 @@ extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree); extern const struct attribute_spec *lookup_attribute_spec (const_tree); +extern void init_attributes (void); + /* Process the attributes listed in ATTRIBUTES and install them in *NODE, which is either a DECL (including a TYPE_DECL) or a TYPE. If a DECL, it should be modified in place; if a TYPE, a copy should be created -- cgit v1.1