diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-11 10:09:15 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-11 10:09:15 +0000 |
commit | 0725e25c3c1c28f88a8fe92d2eac113857e6e407 (patch) | |
tree | 2f18ed197b9be42e898260841573bec131b3071d /gcc/c-family | |
parent | dacfcc898a418c7af5e2eac68662a9b14ca13785 (diff) | |
download | gcc-0725e25c3c1c28f88a8fe92d2eac113857e6e407.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168652 138bc75d-0d04-0410-961f-82ee72b054a4
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 668524415b9..f55bc2d49cf 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 4af7ef4ee4e..2156fa8b0d0 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))) |