aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/attribs.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3be66cc..50f0a54 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * attribs.c (decl_attributes): Guard inform with the return value
+ of the preceding warning.
+
2015-07-03 James Greenhalgh <james.greenhalgh@arm.com>
* doc/invoke.texi (moverride): Move to correct section.
diff --git a/gcc/attribs.c b/gcc/attribs.c
index 265009b..784079b 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -469,10 +469,10 @@ decl_attributes (tree *node, tree attributes, int flags)
/* This is a c++11 attribute that appertains to a
type-specifier, outside of the definition of, a class
type. Ignore it. */
- warning (OPT_Wattributes, "attribute ignored");
- inform (input_location,
- "an attribute that appertains to a type-specifier "
- "is ignored");
+ if (warning (OPT_Wattributes, "attribute ignored"))
+ inform (input_location,
+ "an attribute that appertains to a type-specifier "
+ "is ignored");
continue;
}