2009-11-02 18:00:08 -05:00
|
|
|
|
$OpenBSD: patch-gcc_c-common_c,v 1.2 2009/11/02 23:00:08 jsg Exp $
|
|
|
|
|
--- gcc/c-common.c.orig Mon Jul 27 20:38:17 2009
|
|
|
|
|
+++ gcc/c-common.c Sat Oct 31 03:52:35 2009
|
2009-06-22 18:37:31 -04:00
|
|
|
|
@@ -641,6 +641,8 @@ static tree handle_cleanup_attribute (tree *, tree, tr
|
|
|
|
|
static tree handle_warn_unused_result_attribute (tree *, tree, tree, int,
|
|
|
|
|
bool *);
|
|
|
|
|
static tree handle_sentinel_attribute (tree *, tree, tree, int, bool *);
|
|
|
|
|
+static tree handle_bounded_attribute (tree *, tree, tree, int, bool *);
|
|
|
|
|
+
|
|
|
|
|
/* APPLE LOCAL radar 5932809 - copyable byref blocks */
|
|
|
|
|
static tree handle_blocks_attribute (tree *, tree, tree, int, bool *);
|
|
|
|
|
|
|
|
|
|
@@ -738,6 +740,8 @@ const struct attribute_spec c_common_attribute_table[]
|
|
|
|
|
/* APPLE LOCAL end "unavailable" attribute --ilr */
|
|
|
|
|
{ "vector_size", 1, 1, false, true, false,
|
|
|
|
|
handle_vector_size_attribute },
|
|
|
|
|
+ { "bounded", 3, 4, false, true, false,
|
|
|
|
|
+ handle_bounded_attribute },
|
|
|
|
|
{ "visibility", 1, 1, false, false, false,
|
|
|
|
|
handle_visibility_attribute },
|
|
|
|
|
{ "tls_model", 1, 1, true, false, false,
|
2009-11-02 18:00:08 -05:00
|
|
|
|
@@ -5810,6 +5814,15 @@ handle_vector_size_attribute (tree *node, tree name, t
|
2009-06-22 18:37:31 -04:00
|
|
|
|
*node = reconstruct_complex_type (*node, new_type);
|
|
|
|
|
|
|
|
|
|
return NULL_TREE;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+static tree
|
|
|
|
|
+handle_bounded_attribute (tree *ARG_UNUSED (node), tree ARG_UNUSED (name),
|
|
|
|
|
+ tree ARG_UNUSED (args),
|
|
|
|
|
+ int ARG_UNUSED (flags), bool *no_add_attrs)
|
|
|
|
|
+{
|
|
|
|
|
+ *no_add_attrs = true;
|
|
|
|
|
+ return NULL_TREE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Handle the "nonnull" attribute. */
|