diff options
author | Richard Guenther <rguenther@suse.de> | 2011-01-11 10:09:15 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-01-11 10:09:15 +0000 |
commit | 2aa9c6ae429676dd3e1db7cfb39bf61403c913a0 (patch) | |
tree | 2f18ed197b9be42e898260841573bec131b3071d /gcc/c-family | |
parent | 93c3bf479df17e661b0e867696981565481701a0 (diff) | |
download | gcc-2aa9c6ae429676dd3e1db7cfb39bf61403c913a0.zip gcc-2aa9c6ae429676dd3e1db7cfb39bf61403c913a0.tar.gz gcc-2aa9c6ae429676dd3e1db7cfb39bf61403c913a0.tar.bz2 |
re PR c/32511 (GCC rejects inline+weak function)
2011-01-12 Richard Guenther <rguenther@suse.de>
PR middle-end/32511
* c-common.c (handle_weak_attribute): Warn instead of error
on declaring an inline function weak.
* gcc.dg/attr-weak-1.c: Adjust.
From-SVN: r168652
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 6685244..f55bc2d 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2011-01-12 Richard Guenther <rguenther@suse.de> + + PR middle-end/32511 + * c-common.c (handle_weak_attribute): Warn instead of error + on declaring an inline function weak. + 2011-01-05 Tom Tromey <tromey@redhat.com> * c-common.h (lvalue_error): Update. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 4af7ef4..2156fa8 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -6656,7 +6656,7 @@ handle_weak_attribute (tree *node, tree name, if (TREE_CODE (*node) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (*node)) { - error ("inline function %q+D cannot be declared weak", *node); + warning (OPT_Wattributes, "inline function %q+D declared weak", *node); *no_add_attrs = true; } else if (lookup_attribute ("ifunc", DECL_ATTRIBUTES (*node))) |