summaryrefslogtreecommitdiff
path: root/gcc/attribs.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2015-07-03 18:56:40 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2015-07-03 18:56:40 +0000
commitfe6f27c74270111e20bbfeffb2b7bc3f5fd8fe37 (patch)
tree1a3b8ae1271419c713fa5f702d61437773885dd4 /gcc/attribs.c
parentcd5a9a74d3ac55d9e64894212dfa34d7950e18f3 (diff)
attribs.c (decl_attributes): Guard inform with the return value of the preceding warning.
2015-07-03 Paolo Carlini <paolo.carlini@oracle.com> * attribs.c (decl_attributes): Guard inform with the return value of the preceding warning. From-SVN: r225402
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r--gcc/attribs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c
index 265009b47a2..784079b6814 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;
}