add in a stub for -Wbounded and attribute((bounded)) until its ported
over to gcc3
This commit is contained in:
parent
839f7b1e16
commit
3ef9f242ca
43
lang/egcs/stable/patches/patch-gcc_attribs_c
Normal file
43
lang/egcs/stable/patches/patch-gcc_attribs_c
Normal file
@ -0,0 +1,43 @@
|
||||
$OpenBSD: patch-gcc_attribs_c,v 1.3 2003/06/26 18:39:52 avsm Exp $
|
||||
--- gcc/attribs.c.orig Thu Jun 26 18:07:53 2003
|
||||
+++ gcc/attribs.c Thu Jun 26 18:19:35 2003
|
||||
@@ -88,6 +88,8 @@ static tree handle_deprecated_attribute
|
||||
bool *));
|
||||
static tree handle_vector_size_attribute PARAMS ((tree *, tree, tree, int,
|
||||
bool *));
|
||||
+static tree handle_bounded_attribute PARAMS ((tree *, tree, tree, int,
|
||||
+ bool *));
|
||||
static tree vector_size_helper PARAMS ((tree, tree));
|
||||
|
||||
/* Table of machine-independent attributes common to all C-like languages. */
|
||||
@@ -148,6 +150,8 @@ static const struct attribute_spec c_com
|
||||
handle_deprecated_attribute },
|
||||
{ "vector_size", 1, 1, false, true, false,
|
||||
handle_vector_size_attribute },
|
||||
+ { "bounded", 3, 4, false, true, false,
|
||||
+ handle_bounded_attribute },
|
||||
{ NULL, 0, 0, false, false, false, NULL }
|
||||
};
|
||||
|
||||
@@ -1355,6 +1359,21 @@ vector_size_helper (type, bottom)
|
||||
TREE_THIS_VOLATILE (outer) = TREE_THIS_VOLATILE (type);
|
||||
|
||||
return outer;
|
||||
+}
|
||||
+
|
||||
+/* Handle a "bounded" attribute; arguments as in
|
||||
+ struct attribute_spec.handler.
|
||||
+ Just a stub for now. */
|
||||
+
|
||||
+static tree
|
||||
+handle_bounded_attribute (node, name, args, flags, no_add_attrs)
|
||||
+ tree *node ATTRIBUTE_UNUSED;
|
||||
+ tree name ATTRIBUTE_UNUSED;
|
||||
+ tree args ATTRIBUTE_UNUSED;
|
||||
+ int flags ATTRIBUTE_UNUSED;
|
||||
+ bool *no_add_attrs ATTRIBUTE_UNUSED;
|
||||
+{
|
||||
+ return NULL_TREE;
|
||||
}
|
||||
|
||||
/* Split SPECS_ATTRS, a list of declspecs and prefix attributes, into two
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-gcc_toplev_c,v 1.3 2003/06/16 17:25:19 sturm Exp $
|
||||
--- gcc/toplev.c.orig Tue May 27 13:53:39 2003
|
||||
+++ gcc/toplev.c Tue May 27 13:56:27 2003
|
||||
$OpenBSD: patch-gcc_toplev_c,v 1.4 2003/06/26 18:39:52 avsm Exp $
|
||||
--- gcc/toplev.c.orig Sat Nov 2 00:57:23 2002
|
||||
+++ gcc/toplev.c Thu Jun 26 18:51:53 2003
|
||||
@@ -883,6 +883,9 @@ int align_functions_log;
|
||||
minimum function alignment. Zero means no alignment is forced. */
|
||||
int force_align_functions_log;
|
||||
@ -20,3 +20,13 @@ $OpenBSD: patch-gcc_toplev_c,v 1.3 2003/06/16 17:25:19 sturm Exp $
|
||||
};
|
||||
|
||||
/* Table of language-specific options. */
|
||||
@@ -1331,6 +1336,9 @@ documented_lang_options[] =
|
||||
{ "-Wwrite-strings",
|
||||
N_("Mark strings as 'const char *'") },
|
||||
{ "-Wno-write-strings", "" },
|
||||
+ { "-Wbounded",
|
||||
+ N_("Fake bounds checking option") },
|
||||
+ { "-Wno-bounded", "" },
|
||||
|
||||
#define DEFINE_LANG_NAME(NAME) { NULL, NAME },
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user